BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslmf_functionpointertraits

Macros

#define bslmf_FunctionPointerTraits   bslmf::FunctionPointerTraits
 This alias is defined for backward compatibility.
 
#define bslmf_IsFunctionPointer   bslmf::IsFunctionPointer
 This alias is defined for backward compatibility.
 

Typedefs

typedef bslmf::FunctionPointerCPlusPlusLinkage bslmf_FunctionPointerCPlusPlusLinkage
 This alias is defined for backward compatibility.
 
typedef bslmf::FunctionPointerCLinkage bslmf_FunctionPointerCLinkage
 This alias is defined for backward compatibility.
 

Detailed Description

Outline

Purpose

Provide a meta-function for determining function pointer traits.

Classes

See also
bslmf_memberfunctionpointertraits

Description

This component provides meta-functions for determining whether a type is a pointer to either a free function or a class method (but not to a member function, see the component bslmf_memberfunctionpointertraits component for that), and some information about this function type. The meta-function bslmf::IsFunctionPointer provides an enumerated value which can be either 1 or 0 depending on whether or not the template argument t_PROTOTYPE is a pointer to a free function or class method. In the affirmative, the class bslmf::FunctionPointerTraits also provides information regarding the function type, such as its argument list type and its return type.

Note that there is no reference-to-function traits class, since whether FUNC is a reference to function type can be very easily obtained using the meta-function call bslmf::IsFunctionPointer<FUNC *>.

Usage

Define the following function types:

typedef int (*IntFunctionIntIntPtr)(int, int);
typedef void (*VoidFunc0)();

The following program should compile and run without errors:

Macro Definition Documentation

◆ bslmf_FunctionPointerTraits

#define bslmf_FunctionPointerTraits   bslmf::FunctionPointerTraits

◆ bslmf_IsFunctionPointer

#define bslmf_IsFunctionPointer   bslmf::IsFunctionPointer

Typedef Documentation

◆ bslmf_FunctionPointerCLinkage

◆ bslmf_FunctionPointerCPlusPlusLinkage