This struct provides factory methods that construct binders.
Declared in <bdlf_bind.h>
class BindUtil;
Four families of factory methods are provided: bind, bindR, bindS, and bindSR. All factory methods accept an invocable object, optionally followed by up to fourteen additional arguments. Each argument can be either a literal value, a place-holder, or another Bind or BindWrapper object.
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. Memory for copying the bound functor and bound arguments is supplied by the user-specified allocator if bindS or bindSR is used, or the currently installed default allocator if bind or bindR is used. The return type is inferred by using bslmf::FunctionPointerTraits for free function references and pointers, bslmf::MemberFunctionPointerTraits for member function pointers, and typename t_FUNC::ResultType for a functor of type t_FUNC.
The bindR and bindSR variations must be used when binding to an object for which a result type cannot be automatically determined.
| Name | Description |
|---|---|
bind | bind overloads |
bindR | bindR overloads |
bindS | bindS overloads |
bindSR | bindSR overloads |