[#BloombergLP-bslmf-ResultType_BdeIdiom-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmf.adoc[bslmf]::ResultType&lowbar;BdeIdiom
:relfileprefix: ../../
:mrdocs:

Metafunction to detect the BDE `ResultType` idiom&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,
    class = void&gt;
struct ResultType&lowbar;BdeIdiom
    : xref:BloombergLP/bslmf/ResultType_Fallback-0b.adoc[ResultType&lowbar;Fallback&lt;t&lowbar;FALLBACK&gt;]
----

== Description

This metafunction is 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;

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslmf/ResultType_Fallback-0b.adoc[ResultType&lowbar;Fallback&lt;t&lowbar;FALLBACK&gt;]`
| Metafunction that defines `type` to be the specified `t&lowbar;FALLBACK` type unless `t&lowbar;FALLBACK` is `bslmf&colon;&colon;Nil`&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_BdeIdiom-00.adoc[`ResultType&lowbar;BdeIdiom&lt;t&lowbar;FUNC, t&lowbar;FALLBACK, bsl::void&lowbar;t&lt;t&lowbar;FUNC::ResultType&gt;&gt;`] 
| Specialization of `ResultType&lowbar;BdeIdiom` when `t&lowbar;FUNC&colon;&colon;ResultType` exists&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmf/ResultType-01.adoc[`ResultType`] 
| Metafunction to return the result type of a functor type&period;
|===


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