From Jason Turner

[temp.deduct.conv]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpvjd9ymfe/{from.md → to.md} +18 -18
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 that is
5
- required as the result of the conversion (call it `A`; see 
6
- [[dcl.init]], [[over.match.conv]], and [[over.match.ref]] for the
7
- determination of that type) as described in  [[temp.deduct.type]].
 
 
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, there
30
- are four cases that allow a difference:
31
 
32
- - If the original `A` is a reference type, `A` can be more cv-qualified
33
- than the deduced `A` (i.e., the type referred to by the reference).
34
- - If the original `A` is a function pointer type, `A` can be “pointer to
35
- function even if the deduced `A` is “pointer to `noexcept` function”.
36
- - If the original `A` is a pointer-to-member-function type, `A` can be
37
- “pointer to member of type function” even if the deduced `A` is
38
- “pointer to member of type `noexcept` function”.
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 alternatives are considered only if type deduction would otherwise
43
- fail. If they yield more than one possible deduced `A`, the type
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