20
General utilities library
[utilities]
20.14
Function objects
[function.objects]
20.14.14
Function template
bind_front
[func.bind.front]
🔗
template
<
class
F,
class
.
.
.
Args
>
constexpr
unspecified
bind_front
(
F
&
&
f, Args
&
&
.
.
.
args
)
;
1
#
In the text that follows:
(1.1)
g
is a value of the result of a
bind_front
invocation,
(1.2)
FD
is the type
decay_t
<
F
>
,
(1.3)
fd
is the target object of
g
(
[func.
def]
) of type
FD
, direct-non-list-initialized with
std
::
forward
<
F
>
(
f
)
,
(1.4)
BoundArgs
is a pack that denotes
decay_t
<
Args
>
.
.
.
,
(1.5)
bound_args
is a pack of bound argument entities of
g
(
[func.
def]
) of types
BoundArgs
.
.
.
, direct-non-list-initialized with
std
::
forward
<
Args
>
(
args
)
.
.
.
, respectively, and
(1.6)
call_args
is an argument pack used in a function call expression (
[expr.
call]
) of
g
.
2
#
Mandates
:
is_constructible_v
<
FD, F
>
&
&
is_move_constructible_v
<
FD
>
&
&
(
is_constructible_v
<
BoundArgs, Args
>
&
&
.
.
.
)
&
&
(
is_move_constructible_v
<
BoundArgs
>
&
&
.
.
.
)
is
true
.
3
#
Preconditions
:
FD
meets the
Cpp17MoveConstructible
requirements
.
For each
T
i
in
BoundArgs
, if
T
i
is an object type,
T
i
meets the
Cpp17MoveConstructible
requirements
.
4
#
Returns
: A perfect forwarding call wrapper
g
with call pattern
invoke
(
fd, bound_args
.
.
.
, call_args
.
.
.
)
.
5
#
Throws
: Any exception thrown by the initialization of the state entities of
g
(
[func.
def]
)
.