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')

Synopsis

Description

, 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.

Base Classes

Name

Description

Bind_FuncTraitsImp<t_RET, t_FUNC, (int)bslmf::IsFunctionPointer<t_FUNC *>::value, (int)bslmf::IsFunctionPointer<t_FUNC>::value, (int)bslmf::IsMemberFunctionPointer<t_FUNC>::value>

This struct provides a mechanism for inferring various traits of the function object type t_FUNC. The return type is given by t_RET unless it is bslmf::Nil in which case it is inferred from t_FUNC. The last three parameters IS_FUNCTION, IS_FUNCTION_POINTER and IS_MEMBER_FUNCTION_POINTER specify whether t_FUNC is a free function type (either a reference‐to‐function or plain function type), a pointer to function type, or a pointer to member function type, respectively.

Created with MrDocs