[#BloombergLP-bslmf-ResultType-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmf.adoc[bslmf]::ResultType
:relfileprefix: ../../
:mrdocs:

Metafunction to return the result type of the specified functor type `t&lowbar;FUNC`&period; The nested `type` is identical to `t&lowbar;FUNC&colon;&colon;result&lowbar;type` if such a type exists&semi; otherwise, it is identical to `t&lowbar;FUNC&colon;&colon;ResultType` if that type exists&semi; otherwise, it is identical to the `t&lowbar;FALLBACK` template parameter if it was specified&semi; otherwise, it is undefined&period;

== Synopsis

Declared in `&lt;bslmf&lowbar;resulttype&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;FUNC,
    class t&lowbar;FALLBACK = xref:BloombergLP/bslmf/Nil.adoc[bslmf::Nil],
    class = void&gt;
struct ResultType
    : xref:BloombergLP/bslmf/ResultType_BdeIdiom-0d.adoc[ResultType&lowbar;BdeIdiom&lt;t&lowbar;FUNC, t&lowbar;FALLBACK&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslmf/ResultType_BdeIdiom-0d.adoc[ResultType&lowbar;BdeIdiom&lt;t&lowbar;FUNC, t&lowbar;FALLBACK&gt;]`
| Metafunction to detect the BDE `ResultType` idiom as part of the implementation of `bslmf&colon;&colon;ResultType`&period; This `struct` is instantiated when `t&lowbar;FUNC&colon;&colon;result&lowbar;type` doesn&apos;t exist&period; This primary template is matched when `t&lowbar;FUNC&colon;&colon;ResultType` also does not exist&period; The `t&lowbar;FALLBACK` type, if any, is produced&period;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/ResultType_Fallback-0b/type.adoc[`type`] 
| The fallback type, unless `t&lowbar;FALLBACK` is `bslmf&colon;&colon;Nil`&period;
|===


== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/ResultType-05.adoc[`ResultType&lt;t&lowbar;FUNC, t&lowbar;FALLBACK, bsl::void&lowbar;t&lt;t&lowbar;FUNC::result&lowbar;type&gt;&gt;`] 
| Specialization of `ResultType` for when `t&lowbar;FUNC&colon;&colon;result&lowbar;type` exists, i&period;e&period;, when the C&plus;&plus; standard idiom for `result&lowbar;type` is used&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
