From Jason Turner

[func.invoke]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5i0xjvy2/{from.md → to.md} +14 -1
tmp/tmp5i0xjvy2/{from.md → to.md} RENAMED
@@ -1,11 +1,24 @@
1
- ### Function template `invoke` <a id="func.invoke">[[func.invoke]]</a>
2
 
3
  ``` cpp
4
  template<class F, class... Args>
5
  constexpr invoke_result_t<F, Args...> invoke(F&& f, Args&&... args)
6
  noexcept(is_nothrow_invocable_v<F, Args...>);
7
  ```
8
 
 
 
9
  *Returns:* *INVOKE*(std::forward\<F\>(f),
10
  std::forward\<Args\>(args)...) [[func.require]].
11
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### `invoke` functions <a id="func.invoke">[[func.invoke]]</a>
2
 
3
  ``` cpp
4
  template<class F, class... Args>
5
  constexpr invoke_result_t<F, Args...> invoke(F&& f, Args&&... args)
6
  noexcept(is_nothrow_invocable_v<F, Args...>);
7
  ```
8
 
9
+ *Constraints:* `is_invocable_v<F, Args...>` is `true`.
10
+
11
  *Returns:* *INVOKE*(std::forward\<F\>(f),
12
  std::forward\<Args\>(args)...) [[func.require]].
13
 
14
+ ``` cpp
15
+ template<class R, class F, class... Args>
16
+ constexpr R invoke_r(F&& f, Args&&... args)
17
+ noexcept(is_nothrow_invocable_r_v<R, F, Args...>);
18
+ ```
19
+
20
+ *Constraints:* `is_invocable_r_v<R, F, Args...>` is `true`.
21
+
22
+ *Returns:* *INVOKE*\<R\>(std::forward\<F\>(f),
23
+ std::forward\<Args\>(args)...) [[func.require]].
24
+