tmp/tmp5wkgmpf5/{from.md → to.md}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#### Deduction guides <a id="temp.deduct.guide">[[temp.deduct.guide]]</a>
|
| 2 |
|
| 3 |
Deduction guides are used when a *template-name* appears as a type
|
| 4 |
specifier for a deduced class type [[dcl.type.class.deduct]]. Deduction
|
| 5 |
guides are not found by name lookup. Instead, when performing class
|
| 6 |
-
template argument deduction [[over.match.class.deduct]],
|
| 7 |
-
guides declared for the class template are considered.
|
| 8 |
|
| 9 |
``` bnf
|
| 10 |
deduction-guide:
|
| 11 |
explicit-specifierₒₚₜ template-name '(' parameter-declaration-clause ')' '->' simple-template-id ';'
|
| 12 |
```
|
|
@@ -32,11 +32,11 @@ S x{A()}; // x is of type S<short, int>
|
|
| 32 |
|
| 33 |
The same restrictions apply to the *parameter-declaration-clause* of a
|
| 34 |
deduction guide as in a function declaration [[dcl.fct]]. The
|
| 35 |
*simple-template-id* shall name a class template specialization. The
|
| 36 |
*template-name* shall be the same *identifier* as the *template-name* of
|
| 37 |
-
the *simple-template-id*. A *deduction-guide* shall
|
| 38 |
-
|
| 39 |
-
template,
|
| 40 |
-
same
|
| 41 |
-
|
| 42 |
|
|
|
|
| 1 |
#### Deduction guides <a id="temp.deduct.guide">[[temp.deduct.guide]]</a>
|
| 2 |
|
| 3 |
Deduction guides are used when a *template-name* appears as a type
|
| 4 |
specifier for a deduced class type [[dcl.type.class.deduct]]. Deduction
|
| 5 |
guides are not found by name lookup. Instead, when performing class
|
| 6 |
+
template argument deduction [[over.match.class.deduct]], all reachable
|
| 7 |
+
deduction guides declared for the class template are considered.
|
| 8 |
|
| 9 |
``` bnf
|
| 10 |
deduction-guide:
|
| 11 |
explicit-specifierₒₚₜ template-name '(' parameter-declaration-clause ')' '->' simple-template-id ';'
|
| 12 |
```
|
|
|
|
| 32 |
|
| 33 |
The same restrictions apply to the *parameter-declaration-clause* of a
|
| 34 |
deduction guide as in a function declaration [[dcl.fct]]. The
|
| 35 |
*simple-template-id* shall name a class template specialization. The
|
| 36 |
*template-name* shall be the same *identifier* as the *template-name* of
|
| 37 |
+
the *simple-template-id*. A *deduction-guide* shall inhabit the scope to
|
| 38 |
+
which the corresponding class template belongs and, for a member class
|
| 39 |
+
template, have the same access. Two deduction guide declarations for the
|
| 40 |
+
same class template shall not have equivalent
|
| 41 |
+
*parameter-declaration-clause*s if either is reachable from the other.
|
| 42 |
|