Metafunction to return the result type of the specified functor type t_FUNC. The nested type is identical to t_FUNC::result_type if such a type exists; otherwise, it is identical to t_FUNC::ResultType if that type exists; otherwise, it is identical to the t_FALLBACK template parameter if it was specified; otherwise, it is undefined.
Declared in <bslmf_resulttype.h>
template<
class t_FUNC,
class t_FALLBACK = bslmf::Nil,
class = void>
struct ResultType
: ResultType_BdeIdiom<t_FUNC, t_FALLBACK>
| Name | Description |
|---|---|
ResultType_BdeIdiom<t_FUNC, t_FALLBACK> | Metafunction to detect the BDE ResultType idiom as part of the implementation of bslmf::ResultType. This struct is instantiated when t_FUNC::result_type doesn't exist. This primary template is matched when t_FUNC::ResultType also does not exist. The t_FALLBACK type, if any, is produced. |
| Name | Description |
|---|---|
type | The fallback type, unless t_FALLBACK is bslmf::Nil. |
| Name | Description |
|---|---|
ResultType<t_FUNC, t_FALLBACK, bsl::void_t<t_FUNC::result_type>> | Specialization of ResultType for when t_FUNC::result_type exists, i.e., when the C++ standard idiom for result_type is used. |