[#BloombergLP-bdlf-Bind_FuncTraitsImp-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlf.adoc[bdlf]::Bind&lowbar;FuncTraitsImp
:relfileprefix: ../../
:mrdocs:

This `struct` provides a mechanism for inferring various traits of the function object type `t&lowbar;FUNC`&period; The return type is given by `t&lowbar;RET` unless it is `bslmf&colon;&colon;Nil` in which case it is inferred from `t&lowbar;FUNC`&period; The last three parameters `IS&lowbar;FUNCTION`, `IS&lowbar;FUNCTION&lowbar;POINTER` and `IS&lowbar;MEMBER&lowbar;FUNCTION&lowbar;POINTER` specify whether `t&lowbar;FUNC` is a free function type (either a reference&hyphen;to&hyphen;function or plain function type), a pointer to function type, or a pointer to member function type, respectively&period;

== Synopsis

Declared in `&lt;bdlf&lowbar;bind&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;RET,
    class t&lowbar;FUNC,
    int IS&lowbar;FUNCTION,
    int IS&lowbar;FUNCTION&lowbar;POINTER,
    int IS&lowbar;MEMBER&lowbar;FUNCTION&lowbar;POINTER&gt;
struct Bind&lowbar;FuncTraitsImp;
----

== Description

Only specializations of this class should be used (given below)&period; All specializations define the types and enumerations documented in the `Bind&lowbar;FuncTraits` below&period;

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-088.adoc[`Bind&lowbar;FuncTraitsImp&lt;bslmf::Nil, t&lowbar;FUNC, 0, 0, 0&gt;`] 
| Function traits for function objects that are passed by value without explicit result type specification&period; The result type is determined by either `typename t&lowbar;FUNC&colon;&colon;result&lowbar;type` or `typename t&lowbar;FUNC&colon;&colon;ResultType`, with the former taking precedence if both are defined&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-0a.adoc[`Bind&lowbar;FuncTraitsImp&lt;bslmf::Nil, t&lowbar;FUNC, 0, 0, 1&gt;`] 
| Function traits for member function pointers&period; The result type is determined from the function pointer traits&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-086.adoc[`Bind&lowbar;FuncTraitsImp&lt;bslmf::Nil, t&lowbar;FUNC, 0, 1, 0&gt;`] 
| Function traits for non&hyphen;member function pointers&period; The result type is determined from the function pointer traits&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-048.adoc[`Bind&lowbar;FuncTraitsImp&lt;bslmf::Nil, t&lowbar;FUNC, 1, 0, 0&gt;`] 
| Function traits for non&hyphen;member function types (references or not, but not pointers to function)&period; The result type is determined from the function pointer traits&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-0f2.adoc[`Bind&lowbar;FuncTraitsImp&lt;bslmf::Nil, bsl::function&lt;PROTO&gt;, 0, 0, 0&gt;`] 
| Function traits for bsl&colon;&colon;function objects that are passed by value&period; The result type is determined by `bsl&colon;&colon;function&lt;PROTO&gt;&colon;&colon;result&lowbar;type`&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-0b.adoc[`Bind&lowbar;FuncTraitsImp&lt;bslmf::Nil, t&lowbar;FUNC*, 0, 0, 0&gt;`] 
| Function traits for objects passed by pointer with no explicit return type&period; The object is assumed to have a `result&lowbar;type` or `ResultType` type definition, with the former taking precedence if both are defined&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-0e.adoc[`Bind&lowbar;FuncTraitsImp&lt;bslmf::Nil, bsl::function&lt;PROTO&gt;*, 0, 0, 0&gt;`] 
| Function traits for objects passed by pointer with no explicit return type&period; The object is assumed to have a `ResultType` type definition&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-07.adoc[`Bind&lowbar;FuncTraitsImp&lt;t&lowbar;RET, t&lowbar;FUNC, 0, 0, 0&gt;`] 
| Function traits for function objects that are passed by value with explicit return type specification&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-00.adoc[`Bind&lowbar;FuncTraitsImp&lt;t&lowbar;RET, t&lowbar;FUNC, 0, 0, 1&gt;`] 
| Function traits for member function pointers, with explicit return type specification&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-0fc.adoc[`Bind&lowbar;FuncTraitsImp&lt;t&lowbar;RET, t&lowbar;FUNC, 0, 1, 0&gt;`] 
| Function traits for non&hyphen;member function pointers, with explicit return type specification&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-047.adoc[`Bind&lowbar;FuncTraitsImp&lt;t&lowbar;RET, t&lowbar;FUNC, 1, 0, 0&gt;`] 
| Function traits for non&hyphen;member function types (references or not, but not pointers to function), with explicit return type specification&period;
| xref:BloombergLP/bdlf/Bind_FuncTraitsImp-09.adoc[`Bind&lowbar;FuncTraitsImp&lt;t&lowbar;RET, t&lowbar;FUNC*, 0, 0, 0&gt;`] 
| Function traits for objects passed by pointer with explicit return type&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlf/Bind_FuncTraits.adoc[`Bind&lowbar;FuncTraits`] 
| This `struct` provides various traits of the functor type `t&lowbar;FUNC` documented below&period; If `t&lowbar;RET` is `bslmf&colon;&colon;Nil`, then the return type is inferred by using either `bslmf&colon;&colon;FunctionPointerTraits`, `bslmf&colon;&colon;MemberFunctionPointerTraits`, or `typename t&lowbar;FUNC&colon;&colon;result&lowbar;type` as appropriate&period; &grave; &sol;&sol; ENUMERATIONS enum &lcub; k&lowbar;IS&lowbar;EXPLICIT &sol;&sol; An invocable object is explicit if &period;&period;&period; &sol;&sol; (see &apos;Bind&lowbar;ImplExplicit&apos;)
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
