BDE 4.14.0 Production release
|
Macros | |
#define | bslmf_MemberFunctionPointerTraits bslmf::MemberFunctionPointerTraits |
This alias is defined for backward compatibility. | |
#define | bslmf_IsMemberFunctionPointer bslmf::IsMemberFunctionPointer |
This alias is defined for backward compatibility. | |
#define | bslmf_MemberFunctionPointerTraitsImp bslmf::MemberFunctionPointerTraits_Imp |
This alias is defined for backward compatibility. | |
Provide meta-functions to detect member function pointer traits.
This component provides meta-functions for determining the traits of a member function pointer. Two meta-functions are provided: bslmf::IsMemberFunctionPointer
, and bslmf::MemberFunctionPointerTraits
. bslmf::IsMemberFunctionPointer
tests if a given type is a supported member function pointer. bslmf::MemberFunctionPointerTraits
determines the traits of a member function type, including the type of the object that it is a member of, its result type, and the type of its list of arguments.
Note that, in order to support pre-C++11 compilers in a manageable way, only member functions with up to 14 arguments and no C-style (varargs) elipses are supported on all platforms by this component. When variadic templates are available, any number of arguments are supported. C-style elipses are not supported by this component at all. To identify all member function pointers see bslmf_ismemberfunctionpointer .
Define the following function types:
and the following struct
with the following members:
In order to deduce the types of voidFunc0
and func1
, we will use the C++ template system to get two auxiliary functions:
The following program should compile and run without errors:
#define bslmf_IsMemberFunctionPointer bslmf::IsMemberFunctionPointer |
#define bslmf_MemberFunctionPointerTraits bslmf::MemberFunctionPointerTraits |
#define bslmf_MemberFunctionPointerTraitsImp bslmf::MemberFunctionPointerTraits_Imp |