From Jason Turner

[func.bind.partial]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpph2hvbwu/{from.md → to.md} +38 -0
tmp/tmpph2hvbwu/{from.md → to.md} RENAMED
@@ -45,5 +45,43 @@ wrapper [[term.perfect.forwarding.call.wrapper]] `g` with call pattern:
45
  invocation.
46
 
47
  *Throws:* Any exception thrown by the initialization of the state
48
  entities of `g` [[func.def]].
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  invocation.
46
 
47
  *Throws:* Any exception thrown by the initialization of the state
48
  entities of `g` [[func.def]].
49
 
50
+ ``` cpp
51
+ template<auto f, class... Args>
52
+ constexpr unspecified bind_front(Args&&... args);
53
+ template<auto f, class... Args>
54
+ constexpr unspecified bind_back(Args&&... args);
55
+ ```
56
+
57
+ Within this subclause:
58
+
59
+ - `F` is the type of `f`,
60
+ - `g` is a value of the result of a `bind_front` or `bind_back`
61
+ invocation,
62
+ - `BoundArgs` is a pack that denotes `decay_t<Args>...`,
63
+ - `bound_args` is a pack of bound argument entities of `g` [[func.def]]
64
+ of types `BoundArgs...`, direct-non-list-initialized with
65
+ `std::forward<Args>(args)...`, respectively, and
66
+ - `call_args` is an argument pack used in a function call
67
+ expression [[expr.call]] of `g`.
68
+
69
+ *Mandates:*
70
+
71
+ - `(is_constructible_v<BoundArgs, Args> && ...)` is `true`, and
72
+ - `(is_move_constructible_v<BoundArgs> && ...)` is `true`, and
73
+ - if `is_pointer_v<F> || is_member_pointer_v<F>` is `true`, then
74
+ `f != nullptr` is `true`.
75
+
76
+ *Preconditions:* For each `Tᵢ` in `BoundArgs`, `Tᵢ` meets the
77
+ *Cpp17MoveConstructible* requirements.
78
+
79
+ *Returns:* A perfect forwarding call wrapper [[func.require]] `g` that
80
+ does not have a target object, and has the call pattern:
81
+
82
+ - `invoke(f, bound_args..., call_args...)` for a `bind_front`
83
+ invocation, or
84
+ - `invoke(f, call_args..., bound_args...)` for a `bind_back` invocation.
85
+
86
+ *Throws:* Any exception thrown by the initialization of `bound_args`.
87
+