Metafunction to return the result type of a functor type.

Synopsis

Declared in <bslmf_resulttype.h>

template<
    class t_FUNC,
    class t_FALLBACK = bslmf::Nil,
    class = void>
struct ResultType
    : ResultType_BdeIdiom<t_FUNC, t_FALLBACK>

Description

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.

Base Classes

Name

Description

ResultType_BdeIdiom<t_FUNC, t_FALLBACK>

Metafunction to detect the BDE ResultType idiom.

Type Aliases

Name

Description

type

The fallback type, unless t_FALLBACK is bslmf::Nil.

Specializations

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.

Created with MrDocs