tmp/tmpvjd9ymfe/{from.md → to.md}
RENAMED
|
@@ -1,12 +1,14 @@
|
|
| 1 |
#### Deducing conversion function template arguments <a id="temp.deduct.conv">[[temp.deduct.conv]]</a>
|
| 2 |
|
| 3 |
Template argument deduction is done by comparing the return type of the
|
| 4 |
-
conversion function template (call it `P`) with the type
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
If `P` is a reference type, the type referred to by `P` is used in place
|
| 10 |
of `P` for type deduction and for any further references to or
|
| 11 |
transformations of `P` in the remainder of this subclause.
|
| 12 |
|
|
@@ -24,22 +26,20 @@ If `A` is not a reference type:
|
|
| 24 |
If `A` is a cv-qualified type, the top-level cv-qualifiers of `A`’s type
|
| 25 |
are ignored for type deduction. If `A` is a reference type, the type
|
| 26 |
referred to by `A` is used for type deduction.
|
| 27 |
|
| 28 |
In general, the deduction process attempts to find template argument
|
| 29 |
-
values that will make the deduced `A` identical to `A`. However,
|
| 30 |
-
|
| 31 |
|
| 32 |
-
- If the original `A` is a reference type,
|
| 33 |
-
|
| 34 |
-
- If the original `A` is a function pointer
|
| 35 |
-
function
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
- The deduced `A` can be another pointer or pointer-to-member type that
|
| 40 |
-
can be converted to `A` via a qualification conversion.
|
| 41 |
|
| 42 |
-
These
|
| 43 |
-
fail. If
|
| 44 |
-
deduction fails.
|
| 45 |
|
|
|
|
| 1 |
#### Deducing conversion function template arguments <a id="temp.deduct.conv">[[temp.deduct.conv]]</a>
|
| 2 |
|
| 3 |
Template argument deduction is done by comparing the return type of the
|
| 4 |
+
conversion function template (call it `P`) with the type specified by
|
| 5 |
+
the *conversion-type-id* of the *conversion-function-id* being looked up
|
| 6 |
+
(call it `A`) as described in [[temp.deduct.type]]. If the
|
| 7 |
+
*conversion-function-id* is constructed during overload resolution
|
| 8 |
+
[[over.match.funcs]], the rules in the remainder of this subclause
|
| 9 |
+
apply.
|
| 10 |
|
| 11 |
If `P` is a reference type, the type referred to by `P` is used in place
|
| 12 |
of `P` for type deduction and for any further references to or
|
| 13 |
transformations of `P` in the remainder of this subclause.
|
| 14 |
|
|
|
|
| 26 |
If `A` is a cv-qualified type, the top-level cv-qualifiers of `A`’s type
|
| 27 |
are ignored for type deduction. If `A` is a reference type, the type
|
| 28 |
referred to by `A` is used for type deduction.
|
| 29 |
|
| 30 |
In general, the deduction process attempts to find template argument
|
| 31 |
+
values that will make the deduced `A` identical to `A`. However, certain
|
| 32 |
+
attributes of `A` may be ignored:
|
| 33 |
|
| 34 |
+
- If the original `A` is a reference type, any cv-qualifiers of `A`
|
| 35 |
+
(i.e., the type referred to by the reference).
|
| 36 |
+
- If the original `A` is a function pointer or
|
| 37 |
+
pointer-to-member-function type with a potentially-throwing exception
|
| 38 |
+
specification [[except.spec]], the exception specification.
|
| 39 |
+
- Any cv-qualifiers in `A` that can be restored by a qualification
|
| 40 |
+
conversion.
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
These attributes are ignored only if type deduction would otherwise
|
| 43 |
+
fail. If ignoring them allows more than one possible deduced `A`, the
|
| 44 |
+
type deduction fails.
|
| 45 |
|