[#BloombergLP-bslstl-Function_Variadic-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Function_Variadic-0e.adoc[Function&lowbar;Variadic]&lt;RET(ARGS&period;&period;&period;)&gt;
:relfileprefix: ../../
:mrdocs:

This component&hyphen;private class template contains the physical representation and provides the variadic interfaces for `bsl&colon;&colon;function` (see class and component documentation for `bsl&colon;&colon;function`)&period; `bsl&colon;&colon;function` publicly inherits from an instantiation of this template&period; This implementation class exists to 1) minimize the amount of variadic template expansion required in C&plus;&plus;03 using the `sim&lowbar;cpp11&lowbar;features&period;pl` utility and 2) work around issues with the Sun CC compiler, which has trouble with argument type deduction when a template argument has a partial specialization (as `Function&lowbar;Variadic` does)&period; `bsl&colon;&colon;function` does not have a partial specialization and delegates to the `Function&lowbar;Variadic` base class only those parts of the interface and implementation that depend on decomposing the function prototype into a return type and variadic list of argument types&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class RET,
    class&period;&period;&period; ARGS&gt;
class xref:BloombergLP/bslstl/Function_Variadic-0e.adoc[Function&lowbar;Variadic]&lt;RET(ARGS&period;&period;&period;)&gt;
    : public xref:BloombergLP/bslstl/Function_ArgTypes-06.adoc[Function&lowbar;ArgTypes&lt;RET(ARGS&period;&period;&period;)&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslstl/Function_ArgTypes-06.adoc[Function&lowbar;ArgTypes&lt;RET(ARGS&period;&period;&period;)&gt;]`
| This component&hyphen;private struct template provides the following nested typedefs for `bsl&colon;&colon;function` for a specified `PROTOTYPE` which must be a function type&colon; &grave; argument&lowbar;type &hyphen;&hyphen; Only if PROTOTYPE takes exactly one argument first&lowbar;argument&lowbar;type &hyphen;&hyphen; Only if PROTOTYPE takes exactly two arguments second&lowbar;argument&lowbar;type &hyphen;&hyphen; Only if PROTOTYPE takes exactly two arguments &grave; The C&plus;&plus; Standard requires that `function` define these typedefs for compatibility with one&hyphen; and two&hyphen;argument legacy (now deprecated) functor adaptors&period; `bsl&colon;&colon;function` publicly inherits from an instantiation of this template in order to conditionally declare the above nested types&period; This primary (unspecialized) template provides no typedefs&period;
|===

== Type Aliases

[cols="1"]
|===
| Name
| xref:BloombergLP/bslstl/Function_Variadic-08/allocator_type.adoc[`allocator&lowbar;type`] 
| xref:BloombergLP/bslstl/Function_Variadic-08/result_type.adoc[`result&lowbar;type`] 
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/Function_Variadic-08/2constructor.adoc[`Function&lowbar;Variadic`]         [.small]#[constructor]#
| Create an empty object&period; Use the specified `allocator` (e&period;g&period;, the address of a `bslma&colon;&colon;Allocator`) to supply memory&period;
| xref:BloombergLP/bslstl/Function_Variadic-08/operator_call.adoc[`operator()`] 
| If this object is empty, throw `bsl&colon;&colon;bad&lowbar;function&lowbar;call`&semi; otherwise invoke the target object with the specified `args&period;&period;&period;` and return the result (after conversion to `RET`)&period; Note that, even though it is declared `const`, this call operator can mutate the target object and is thus considered a manipulator rather than an accessor&period;
|===


== Protected Data Members

[cols="1"]
|===
| Name
| xref:BloombergLP/bslstl/Function_Variadic-08/d_rep.adoc[`d&lowbar;rep`] 
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:bsl/function-0a.adoc[bsl::function]`
| Forward declaration&period;
|===


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