[#BloombergLP-bdlf-BindUtil]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlf.adoc[bdlf]::BindUtil
:relfileprefix: ../../
:mrdocs:

This `struct` provides factory methods that construct binders&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class BindUtil;
----

== Description

Four families of factory methods are provided&colon; `bind`, `bindR`, `bindS`, and `bindSR`&period; All factory methods accept an invocable object, optionally followed by up to fourteen additional arguments&period; Each argument can be either a literal value, a place&hyphen;holder, or another `Bind` or `BindWrapper` object&period;

The `BindUtil` class methods compute the signature of the function object automatically, including the return type, and return a binder object with the specified bound functor and bound arguments&period; Memory for copying the bound functor and bound arguments is supplied by the user&hyphen;specified allocator if `bindS` or `bindSR` is used, or the currently installed default allocator if `bind` or `bindR` is used&period; The return type is inferred by using `bslmf&colon;&colon;FunctionPointerTraits` for free function references and pointers, `bslmf&colon;&colon;MemberFunctionPointerTraits` for member function pointers, and `typename t&lowbar;FUNC&colon;&colon;ResultType` for a functor of type `t&lowbar;FUNC`&period;

The `bindR` and `bindSR` variations must be used when binding to an object for which a result type cannot be automatically determined&period;

== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlf/BindUtil/bind-04.adoc[`bind`] 
| `bind` overloads
| xref:BloombergLP/bdlf/BindUtil/bindR-0c.adoc[`bindR`] 
| `bindR` overloads
| xref:BloombergLP/bdlf/BindUtil/bindS-07d.adoc[`bindS`] 
| `bindS` overloads
| xref:BloombergLP/bdlf/BindUtil/bindSR-0bb.adoc[`bindSR`] 
| `bindSR` overloads
|===



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