... are determined as specified below:
The values of the bound arguments v1, v2, ..., vN and their corresponding types V1, V2, ..., VN depend on the types TiD derived from the call to bind and the cv -qualifiers cv of the call wrapper g as follows:
- if TiD is reference_wrapper, the argument is tid.get() and its type Vi is T&;
- if the value of is_bind_expression::value is true, the argument is tid(std::forward(uj)...) and its type Vi is result_of::type;
- if the value j of is_placeholder::value is not zero, the argument is std::forward(uj) and its type Vi is Uj&&;
- otherwise, the value is tid and its type Vi is TiD cv &.
In other words:
- If you bound a reference wrapper, it unwraps that and passes it into the wrapped function object
- If you bound another result of
std::bind
, or anything else whichstd::is_bind_expression
evaluates as true, it passes all of the arguments from the call site to that and passes the result to the wrapped function object - If you bound a placeholder object, then it passes in the appropriate call site argument
- Otherwise, it passes the bound argument