cpp/utility/functional/bind front

Function templates and  generate a forwarding call wrapper for. Calling this wrapper is equivalent to invoking with its (1) first or (2) last  parameters bound to.

In other words:
 * is equivalent to.
 * is equivalent to.

The program is ill-formed if any of the following is :

Return value
A function object of type that is unspecified, except that the types of objects returned by two calls to  or  with the same arguments are the same.

The returned object (call wrapper) has the following properties: {{member|{{small|bind-partial}} return type|2=

Let {{tt|bind-partial}} be either or.

Member objects
The returned object behaves as if it holds a member object of type  direct-non-list-initialized from, and an std object  constructed with , except that the returned object's assignment behavior is unspecified and the names are for exposition only.

Constructors
The return type of behaves as if its copy/move constructors perform a memberwise copy/move. It is if all of its member objects (specified above) are, and is  otherwise.

Member function
Given an object obtained from an earlier call to, when a glvalue  designating  is invoked in a function call expression , an invocation of the stored object takes place, as if by
 * , when is, or by
 * , when is, where
 * is an integer pack
 * is an lvalue in the std expression if it is an lvalue in the call expression, and is an rvalue otherwise. Thus can move the bound arguments into the call, where  would copy.

The program is ill-formed if has volatile-qualified type.

The member is  if the std expression it calls is noexcept (in other words, it preserves the exception specification of the underlying call operator). }}

Exceptions
Only throws if construction of stored function object or any of the bound arguments throws.