From Jason Turner

[func.wrap.ref.deduct]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpnzoht5rt/{from.md → to.md} +38 -0
tmp/tmpnzoht5rt/{from.md → to.md} RENAMED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ##### Deduction guides <a id="func.wrap.ref.deduct">[[func.wrap.ref.deduct]]</a>
2
+
3
+ ``` cpp
4
+ template<class F>
5
+ function_ref(F*) -> function_ref<F>;
6
+ ```
7
+
8
+ *Constraints:* `is_function_v<F>` is `true`.
9
+
10
+ ``` cpp
11
+ template<auto f>
12
+ function_ref(nontype_t<f>) -> function_ref<see below>;
13
+ ```
14
+
15
+ Let `F` be `remove_pointer_t<decltype(f)>`.
16
+
17
+ *Constraints:* `is_function_v<F>` is `true`.
18
+
19
+ *Remarks:* The deduced type is `function_ref<F>`.
20
+
21
+ ``` cpp
22
+ template<auto f, class T>
23
+ function_ref(nontype_t<f>, T&&) -> function_ref<see below>;
24
+ ```
25
+
26
+ Let `F` be `decltype(f)`.
27
+
28
+ *Constraints:*
29
+
30
+ - `F` is of the form `R(G::*)(A...) cv `\\ₒₚₜ ` noexcept(E)` for a type
31
+ `G`, or
32
+ - `F` is of the form `M G::*` for a type `G` and an object type `M`, in
33
+ which case let `R` be `invoke_result_t<F, T&>`, `A...` be an empty
34
+ pack, and `E` be `false`, or
35
+ - `F` is of the form `R(*)(G, A...) noexcept(E)` for a type `G`.
36
+
37
+ *Remarks:* The deduced type is `function_ref<R(A...) noexcept(E)>`.
38
+