|
BDE 4.39.x Production Release
|
#include <bslstl_function_invokerutil.h>
This struct is a namespace containing a single function template, invokerForFunc, that returns a pointer to a function that is used to invoke a callable object of a particular type.
Public Types | |
| enum | { e_Null , e_FunctionPtr , e_MemFunctionPtr , e_MemDataPtr , e_InplaceFunctor , e_OutofplaceFunctor } |
| typedef Function_Rep::GenericInvoker | GenericInvoker |
Public Member Functions | |
| template<class PROTOTYPE > | |
| bslstl::Function_InvokerUtil::GenericInvoker * | invokerForFunc (const bsl::nullptr_t &) |
| template<class PROTOTYPE , class FUNC > | |
| bslstl::Function_InvokerUtil::GenericInvoker * | invokerForFunc (const FUNC &f) |
Static Public Member Functions | |
| template<class PROTOTYPE > | |
| static GenericInvoker * | invokerForFunc (const bsl::nullptr_t &) |
| template<class PROTOTYPE , class FUNC > | |
| static GenericInvoker * | invokerForFunc (const FUNC &f) |
| static BSLA_NORETURN void | throwBadFunctionCall () |
| typedef Function_Rep::GenericInvoker bslstl::Function_InvokerUtil::GenericInvoker |
Generic function pointer. This type is as close as we can get to void * for function pointers.
| anonymous enum |
|
static |
Return a null pointer.
PROTOTYPE must be supplied excplicitly, as there is no way to deduce it from the function arguments.
|
inline |
|
static |
Return a pointer to the invoker for a callable object of (template paramter) type FUNC. If the specified f object is a null pointer or null pointer-to-member, return a null pointer.
PROTOTYPE must be supplied excplicitly, as there is no way to deduce it from the function arguments. | bslstl::Function_InvokerUtil::GenericInvoker * bslstl::Function_InvokerUtil::invokerForFunc | ( | const FUNC & | f | ) |
|
static |
Throw a bsl::bad_function_call exception in an exception-enabled build; otherwise, invoke the currently installed assertion violation handler.