[#BloombergLP-bslstl-Function_InvokerUtil_Dispatch-09a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::Function&lowbar;InvokerUtil&lowbar;Dispatch
:relfileprefix: ../../
:mrdocs:

Dispatcher that invokes a callable of category `INVOCATION&lowbar;TYPE`&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;function&lowbar;invokerutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    int INVOCATION&lowbar;TYPE,
    class PROTOTYPE,
    class FUNC&gt;
struct Function&lowbar;InvokerUtil&lowbar;Dispatch;
----

== Description

Specializations of this class contain a static `invoke` method that can invoke a callable object of type `FUNC`, converting each argument in `PROTOTYPE` (a function prototype) to the corresponding argument in the invocation of the callable object and converting the return value of the invocation to the return type of `PROTOTYPE`&period; The `INVOCATION&lowbar;TYPE` specifies the category of callable object&colon; pointer to function, pointer to member function, pointer to data member, inplace functor (i&period;e&period;, one that qualifies for the small&hyphen;object optimization) and out&hyphen;of&hyphen;place functor (i&period;e&period;, one that is not stored in the small&hyphen;object buffer)&period;

== Specializations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Function_InvokerUtil_Dispatch-03.adoc[`Function&lowbar;InvokerUtil&lowbar;Dispatch&lt;Function&lowbar;InvokerUtil&colon;&colon;e&lowbar;FunctionPtr, RET(ARGS&period;&period;&period;), FUNC&gt;`] 
| Specialization of dispatcher for pointer&hyphen;to&hyphen;function objects&period;
| xref:BloombergLP/bslstl/Function_InvokerUtil_Dispatch-096.adoc[`Function&lowbar;InvokerUtil&lowbar;Dispatch&lt;Function&lowbar;InvokerUtil&colon;&colon;e&lowbar;InplaceFunctor, RET(ARGS&period;&period;&period;), FUNC&gt;`] 
| Specialization of dispatcher functor class objects that are suitable for the small&hyphen;object optimization and are thus allocated inplace&period;
| xref:BloombergLP/bslstl/Function_InvokerUtil_Dispatch-04.adoc[`Function&lowbar;InvokerUtil&lowbar;Dispatch&lt;Function&lowbar;InvokerUtil&colon;&colon;e&lowbar;OutofplaceFunctor, RET(ARGS&period;&period;&period;), FUNC&gt;`] 
| Specialization of dispatcher functor class objects that are not suitable for the small&hyphen;object optimization and are thus allocated out of place&period;
| xref:BloombergLP/bslstl/Function_InvokerUtil_Dispatch-08.adoc[`Function&lowbar;InvokerUtil&lowbar;Dispatch&lt;Function&lowbar;InvokerUtil&colon;&colon;e&lowbar;MemDataPtr, RET(ARG0), MEMBER&lowbar;TYPECLASS&lowbar;TYPE::*&gt;`] 
| Specialization of dispatcher for pointer to data member objects&period;
| xref:BloombergLP/bslstl/Function_InvokerUtil_Dispatch-0f.adoc[`Function&lowbar;InvokerUtil&lowbar;Dispatch&lt;Function&lowbar;InvokerUtil&colon;&colon;e&lowbar;MemFunctionPtr, RET(ARG0, ARGS&period;&period;&period;), FUNC&gt;`] 
| Specialization of dispatcher for pointer to member function objects&period;
|===



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