[#BloombergLP-bdlf-Bind_FuncTraits] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlf.adoc[bdlf]::Bind_FuncTraits :relfileprefix: ../../ :mrdocs: 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 Declared in `<bdlf_bind.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_RET, class t_FUNC> struct Bind_FuncTraits : xref:BloombergLP/bdlf/Bind_FuncTraitsImp-05.adoc[Bind_FuncTraitsImp<t_RET, t_FUNC, (int)bslmf::IsFunctionPointer<t_FUNC *>::value, (int)bslmf::IsFunctionPointer<t_FUNC>::value, (int)bslmf::IsMemberFunctionPointer<t_FUNC>::value>] ---- == 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 [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bdlf/Bind_FuncTraitsImp-05.adoc[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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#