BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlf::Bind_FuncTraits< t_RET, t_FUNC > Struct Template Reference

#include <bdlf_bind.h>

Inheritance diagram for bdlf::Bind_FuncTraits< t_RET, t_FUNC >:
bdlf::Bind_FuncTraitsImp< t_RET, t_FUNC,(int) bslmf::IsFunctionPointer< t_FUNC * >::value,(int) bslmf::IsFunctionPointer< t_FUNC >::value,(int) bslmf::IsMemberFunctionPointer< t_FUNC >::value >

Detailed Description

template<class t_RET, class t_FUNC>
struct bdlf::Bind_FuncTraits< t_RET, t_FUNC >

This struct provides various traits of the functor type t_FUNC documented below. If t_RET is bslmf::Nil, then the return type is inferred by using either bslmf::FunctionPointerTraits, bslmf::MemberFunctionPointerTraits, or typename t_FUNC::result_type as appropriate.

// ENUMERATIONS
enum {
k_IS_EXPLICIT // An invocable object is explicit if ...
// (see 'Bind_ImplExplicit')
, k_IS_MEMBER_OFFSET // Offset for calculating evaluation of
// placeholder values at invocation. Will
// be 1 for member function pointers, and 0
// otherwise.
, k_HAS_POINTER_SEMANTICS // Whether the bound functor should be
// invoked by address or by value.
};
// PUBLIC TYPES
typedef ... Type; // type of the bound function object
typedef ... WrapperType; // type of the bound object wrapper
typedef ... ResultType; // return type of the bound function
// object
typedef ... FuncArgumentList; // signature of the bound function object,
// a 'bslmf::TypeList'

The table below gives a summary of the values set by the specializations of Bind_FuncTraitsImp, where X represents a class type and T represents the return type (given explicitly by t_RET, or deduced by the nested ResultType of X or of the appropriate traits when t_RET is specified as bslmf::Nil).

t_RET t_FUNC IS _FN IS_FNP IS_MEM IS_EXPLICIT OFFSET PTR_SEM


T T(...) 1 0 0 1^ 0 0 T T(*)(...) 0 1 0 1^ 0 0 T T(X::*)(...) 0 0 1 1 1 0 T X 0 0 0 0 A B T X* 0 0 0 0 A 1 bslmf::Nil T(...) 1 0 0 1^ 0 0 bslmf::Nil T(*)(..) 0 1 0 1^ 0 0 bslmf::Nil T(X::*)(...) 0 0 1 1 1 0 bslmf::Nil X 0 0 0 0 A B bslmf::Nil X* 0 0 0 0 A 1

A: undefined, since unused by Bin_Impl, which is used for non-explicit binders. B: as determined by the value of bslalg_TypeTraits<X, bslalg::TypeTraitHasPointerSemantics>. ^: in the (rare) case where the t_FUNC type has an ellipsis argument, the k_IS_EXPLICIT will be set to 0. Note that we only support the ellipsis in non-member functions.


The documentation for this struct was generated from the following file: