[#BloombergLP-bdlf] = xref:BloombergLP.adoc[BloombergLP]::bdlf :relfileprefix: ../ :mrdocs: Namespace for function‐binding utilities. == Namespaces [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlf/PlaceHolders.adoc[`PlaceHolders`] | Namespace containing placeholder objects `_1` through `_14` for use with `bdlf::BindUtil::bind`. |=== == Types [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlf/Bind.adoc[`Bind`] | This bind class select the implementation for the given template arguments. Note that instances of this class should not be created explicitly, instead use the `BindUtil` factory methods. | xref:BloombergLP/bdlf/BindUtil.adoc[`BindUtil`] | This `struct` provides a namespace for utility functions used to construct `Bind` and `BindWrapper` objects. 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. | xref:BloombergLP/bdlf/BindWrapper.adoc[`BindWrapper`] | This wrapper class provides a binder with shared pointer semantics to a non‐modifiable binder (both `operator*` and `operator‐>` accessors) and forward its construction arguments to the underlying binder. Note that instances of this class should not be created explicitly, instead use the `BindUtil` factory methods. Note also that instances of this class can be invoked directly, in order to meet user expectations that the result of `BindUtil::bind` be an invocable just as the result of `bdlf::BindUtil::bind` is; in that case, the invocation parameters are simply forwarded to the shared binder. Note finally that even though this wrapper has pointer semantics for the `operator*` and `operator‐>`, it has value semantics for the invocation: invoking a non‐modifiable wrapper will forward the invocation to the non‐modifiable binder shared by that wrapper, even though pointer semantics have it . | xref:BloombergLP/bdlf/Bind_ArgTuple0.adoc[`Bind_ArgTuple0`] | This `struct` provides the creators for a list of zero arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple1.adoc[`Bind_ArgTuple1`] | This `struct` stores a list of one argument. | xref:BloombergLP/bdlf/Bind_ArgTuple10.adoc[`Bind_ArgTuple10`] | This `struct` stores a list of ten arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple11.adoc[`Bind_ArgTuple11`] | This `struct` stores a list of eleven arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple12.adoc[`Bind_ArgTuple12`] | This `struct` stores a list of twelve arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple13.adoc[`Bind_ArgTuple13`] | This `struct` stores a list of thirteen arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple14.adoc[`Bind_ArgTuple14`] | This `struct` stores a list of fourteen arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple2.adoc[`Bind_ArgTuple2`] | This `struct` stores a list of two arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple3.adoc[`Bind_ArgTuple3`] | This `struct` stores a list of three arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple4.adoc[`Bind_ArgTuple4`] | This `struct` stores a list of four arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple5.adoc[`Bind_ArgTuple5`] | This `struct` stores a list of five arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple6.adoc[`Bind_ArgTuple6`] | This `struct` stores a list of six arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple7.adoc[`Bind_ArgTuple7`] | This `struct` stores a list of seven arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple8.adoc[`Bind_ArgTuple8`] | This `struct` stores a list of eight arguments. | xref:BloombergLP/bdlf/Bind_ArgTuple9.adoc[`Bind_ArgTuple9`] | This `struct` stores a list of nine arguments. | xref:BloombergLP/bdlf/Bind_ArgTupleValue-0d8.adoc[`Bind_ArgTupleValue`] | This local class provides storage for a value of the specified `TYPE` suitable for storing an argument value in one of the `Bind_ArgTuple[0‐14]` local classes. `TYPE` must already be a `bslmf::ForwardingType`, meaning no extra copies will be made (unless the type is a fundamental type, which is meant to be copied for efficiency). | xref:BloombergLP/bdlf/Bind_BoundTuple0.adoc[`Bind_BoundTuple0`] | This `struct` provides the creators for a list of zero arguments. | xref:BloombergLP/bdlf/Bind_BoundTuple1.adoc[`Bind_BoundTuple1`] | This `struct` stores a list of one argument. It does _not_ use the const‐forwarding type of its argument, unlike `Bind_ArgTuple1` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple10.adoc[`Bind_BoundTuple10`] | This `struct` stores a list of ten arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple10` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple11.adoc[`Bind_BoundTuple11`] | This `struct` stores a list of eleven arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple11` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple12.adoc[`Bind_BoundTuple12`] | This `struct` stores a list of twelve arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple12` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple13.adoc[`Bind_BoundTuple13`] | This `struct` stores a list of thirteen arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple13` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple14.adoc[`Bind_BoundTuple14`] | This `struct` stores a list of fourteen arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple14` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple2.adoc[`Bind_BoundTuple2`] | This `struct` stores a list of two arguments. It does _not_ use the const‐forwarding type of its argument, unlike `Bind_ArgTuple2` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple3.adoc[`Bind_BoundTuple3`] | This `struct` stores a list of three arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple3` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple4.adoc[`Bind_BoundTuple4`] | This `struct` stores a list of four arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple4` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple5.adoc[`Bind_BoundTuple5`] | This `struct` stores a list of five arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple5` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple6.adoc[`Bind_BoundTuple6`] | This `struct` stores a list of six arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple6` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple7.adoc[`Bind_BoundTuple7`] | This `struct` stores a list of seven arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple7` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple8.adoc[`Bind_BoundTuple8`] | This `struct` stores a list of eight arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple8` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTuple9.adoc[`Bind_BoundTuple9`] | This `struct` stores a list of nine arguments. It does _not_ use the const‐forwarding type of its arguments, unlike `Bind_ArgTuple9` which applies that optimization to avoid unnecessary copying. | xref:BloombergLP/bdlf/Bind_BoundTupleValue.adoc[`Bind_BoundTupleValue`] | This local class provides storage for a value of the specified `TYPE` suitable for storing an argument value in one of the `Bind_BoundTuple*` local classes. This general template definition ensures that the allocator passed to the creators is passed through to the value if it uses an allocator, using the `bslalg::ConstructorProxy` mechanism. | xref:BloombergLP/bdlf/Bind_CalcParameterMask.adoc[`Bind_CalcParameterMask`] | This meta‐function is used to calculate a mask that indicates which parameters in `t_BOUND_TUPLE` are place‐holders and which ones are literal values. It is used by `Bind_ImplExplicit`. | xref:BloombergLP/bdlf/Bind_Evaluator-0b.adoc[`Bind_Evaluator`] | Component‐private utility for evaluating a bound function call. | xref:BloombergLP/bdlf/Bind_FuncTraits.adoc[`Bind_FuncTraits`] | This `struct` provides various traits of the functor type `t_FUNC` documented below. If `t_RET` is `bslmf::Nil`, then the return type is inferred by using either `bslmf::FunctionPointerTraits`, `bslmf::MemberFunctionPointerTraits`, or `typename t_FUNC::result_type` as appropriate. ` // ENUMERATIONS enum { k_IS_EXPLICIT // An invocable object is explicit if ... // (see 'Bind_ImplExplicit') | xref:BloombergLP/bdlf/Bind_FuncTraitsHasNoEllipsis-0a.adoc[`Bind_FuncTraitsHasNoEllipsis`] | Determines whether a function type has the ellipsis as an argument. This is needed for making the binder non‐explicit in case of a function pointer, reference, or member function pointer. By default, a function does not take an ellipsis unless specialized below. This traits class is used in the `Bind_FuncTraitsImp` below. Note that this meta function is not supported on sun studio 8. | xref:BloombergLP/bdlf/Bind_FuncTraitsImp-05.adoc[`Bind_FuncTraitsImp`] | This `struct` provides a mechanism for inferring various traits of the function object type `t_FUNC`. The return type is given by `t_RET` unless it is `bslmf::Nil` in which case it is inferred from `t_FUNC`. The last three parameters `IS_FUNCTION`, `IS_FUNCTION_POINTER` and `IS_MEMBER_FUNCTION_POINTER` specify whether `t_FUNC` is a free function type (either a reference‐to‐function or plain function type), a pointer to function type, or a pointer to member function type, respectively. | xref:BloombergLP/bdlf/Bind_FuncTraitsImp_OneResultTypeOrAnother.adoc[`Bind_FuncTraitsImp_OneResultTypeOrAnother`] | Define the type variable `type` to be `t_FUNC::result_type` if that exists and `t_FUNC::ResultType` otherwise. Additionally, for C++11 and above, if `t_FUNC` has an `operator()` member (such as lambda functions), define `type` to be the return type of that operator. | xref:BloombergLP/bdlf/Bind_Invoker-046.adoc[`Bind_Invoker`] | Component‐private invoker for bound function calls. | xref:BloombergLP/bdlf/Bind_MapParameter-0f.adoc[`Bind_MapParameter`] | This meta‐function is used to select the type at `t_OFFSET` positions of the `t_INDEX` position in an argument list type `t_FUNC_ARGS`, which is of type `bslmf::TypeList` denoting the arguments of `t_FUNC`. Note that this class is used by `Bind_ImplExplicit`. | xref:BloombergLP/bdlf/Bind_MemFnObjectWrapper.adoc[`Bind_MemFnObjectWrapper`] | This local class is used to wrap an object used to invoke a member functions bound to a `Bind` binder. In explicit binding, the argument types of operator() are determined during `Bind` instantiation. If a member function is bound to the binder, and the object to invoke the member function on is passed as an invocation argument (instead of a bound argument), the exact type of the object ‐ whether it is a pointer or reference ‐ cannot be determined based on the method signature. This wrapper serve as an intermediate type to wrap around the object pointer or reference. This class is declared to have pointer semantics, such that `MemFn` will properly dereference the object to invoke the member function. | xref:BloombergLP/bdlf/Bind_PlaceHolderIndex-01.adoc[`Bind_PlaceHolderIndex`] | This template, passed the type of one of the bound arguments to a function object, yields: * if the specified `t_BOUND_TYPE` is a place holder, the index of the place holder object * zero otherwise | xref:BloombergLP/bdlf/Bind_PlaceHolderMask-05.adoc[`Bind_PlaceHolderMask`] | This template, passed the type of one of the bound arguments to a function object, yields: * If the specified `t_BOUND_TYPE` is a place holder, a mask with the bit at the index of the place holder set. * If the specified `t_BOUND_TYPE` is a `Bind` or `BindWrapper`, a mask with bit 24 set. * Zero otherwise. | xref:BloombergLP/bdlf/MemFn.adoc[`MemFn`] | This class encapsulates a member function pointer having the parameterized `PROTOTYPE`, such that the member function pointer can be invoked in syntactically the same manner as a free function pointer. When invoking a member function through this wrapper, the first argument must be a pointer or reference to the instance on which to invoke the member function pointer. Zero to fourteen additional arguments may be specified depending on `PROTOTYPE`. | xref:BloombergLP/bdlf/MemFnInstance.adoc[`MemFnInstance`] | This class encapsulates a member function pointer having the parameterized `PROTOTYPE` and a value of the parameterized `INSTANCE` type, which can be either be the type of object referred to by the `PROTOTYPE`, or a pointer to one, such that the member function pointer can be invoked on the wrapped instance in syntactically the same manner as a free function pointer. Zero to fourteen additional arguments may be specified depending on the `PROTOTYPE`. Note that whether `INSTANCE` is a pointer or an object is determined by whether it has pointer semantics or not (as determined by the `bslmf::HasPointerSemantics` type trait). Also note that if `INSTANCE` is an object that does not have pointer semantics, `PROTOTYPE` must be const‐qualified. | xref:BloombergLP/bdlf/MemFnUtil.adoc[`MemFnUtil`] | The methods provided in this utility are used for constructing `MemFn` and `MemFnInstance` objects from function pointers. | xref:BloombergLP/bdlf/MemFn_Dereference.adoc[`MemFn_Dereference`] | This utility is used to convert user supplied values to references to `OBJTYPE` for object references that are directly convertible to `OBJTYPE`, the reference is returned directly. For pointers and objects that are not directly convertible (e.g., "smart pointers to `OBJTYPE`"), the result of `*OBJECT` is returned, where `OBJECT` is the pointer or object reference. | xref:BloombergLP/bdlf/NoOp-02.adoc[`NoOp`] | This functor class provides a function‐call operator that accepts any number of arguments of any type, does nothing (leaving the arguments unmodified), and returns `void`. | xref:BloombergLP/bdlf/Overloaded-03.adoc[`Overloaded`] | `Overloaded` is a structure that holds a series of objects that have an `operator()`, and provides the ability to call one of them determined by the parameters that are passed to the operator. | xref:BloombergLP/bdlf/Overloaded_ConstMemberFunctionPointer.adoc[`Overloaded_ConstMemberFunctionPointer`] | The class Overloaded_ConstMemberFunctionPointer wraps a member function pointer. It is implicitly constructible from the pointer, and provides an `operator()` that takes an object of the appropriate type and other arguments, and forwards them on to the underlying function. | xref:BloombergLP/bdlf/Overloaded_ConstNoexceptMemberFunctionPointer.adoc[`Overloaded_ConstNoexceptMemberFunctionPointer`] | The class Overloaded_ConstNoexceptMemberFunctionPointer wraps a member function pointer. It is implicitly constructible from the pointer, and provides an `operator()` that takes an object of the appropriate type and other arguments, and forwards them on to the underlying function. | xref:BloombergLP/bdlf/Overloaded_FunctionPointer.adoc[`Overloaded_FunctionPointer`] | Overloaded_FunctionPointer wraps a function pointer. It is implicitly constructible from the pointer, and provides an `operator()` method that calls through to the underlying function. | xref:BloombergLP/bdlf/Overloaded_MemberFunctionPointer.adoc[`Overloaded_MemberFunctionPointer`] | The class Overloaded_MemberFunctionPointer wraps a member function pointer. It is implicitly constructible from the pointer, and provides an `operator()` that takes an object of the appropriate type and other arguments, and forwards them on to the underlying function. | xref:BloombergLP/bdlf/Overloaded_NoexceptFunctionPointer.adoc[`Overloaded_NoexceptFunctionPointer`] | Overloaded_NoexceptFunctionPointer wraps a function pointer. It is implicitly constructible from the pointer, and provides an `operator()` method that calls through to the underlying function. | xref:BloombergLP/bdlf/Overloaded_NoexceptMemberFunctionPointer.adoc[`Overloaded_NoexceptMemberFunctionPointer`] | The class Overloaded_NoexceptMemberFunctionPointer wraps a member function pointer. It is implicitly constructible from the pointer, and provides an `operator()` that takes an object of the appropriate type and other arguments, and forwards them on to the underlying function. | xref:BloombergLP/bdlf/Overloaded_Wrapper-073.adoc[`Overloaded_Wrapper`] | Metafunction that selects the appropriate wrapper type for a callable. | xref:BloombergLP/bdlf/PlaceHolder.adoc[`PlaceHolder`] | Placeholder type for the `bdlf::Bind` argument‐binding facility. |=== == Variables [cols="1"] |=== | Name | xref:BloombergLP/bdlf/noOp-01.adoc[`noOp`] |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#