From Jason Turner

[over.best.ics.general]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp182nnt98/{from.md → to.md} +23 -23
tmp/tmp182nnt98/{from.md → to.md} RENAMED
@@ -9,17 +9,17 @@ single expression [[dcl.init]], [[dcl.init.ref]].
9
 
10
  Implicit conversion sequences are concerned only with the type,
11
  cv-qualification, and value category of the argument and how these are
12
  converted to match the corresponding properties of the parameter.
13
 
14
- [*Note 1*: Other properties, such as the lifetime, storage class,
15
- alignment, accessibility of the argument, whether the argument is a
16
- bit-field, and whether a function is deleted [[dcl.fct.def.delete]], are
17
- ignored. So, although an implicit conversion sequence can be defined for
18
- a given argument-parameter pair, the conversion from the argument to the
19
- parameter might still be ill-formed in the final
20
- analysis. — *end note*]
21
 
22
  A well-formed implicit conversion sequence is one of the following
23
  forms:
24
 
25
  - a standard conversion sequence [[over.ics.scs]],
@@ -76,40 +76,40 @@ parameter.
76
  [*Note 3*: When the parameter has a class type, this is a conceptual
77
  conversion defined for the purposes of [[over]]; the actual
78
  initialization is defined in terms of constructors and is not a
79
  conversion. — *end note*]
80
 
81
- Any difference in top-level cv-qualification is subsumed by the
82
- initialization itself and does not constitute a conversion.
83
-
84
- [*Example 2*: A parameter of type `A` can be initialized from an
85
- argument of type `const A`. The implicit conversion sequence for that
86
- case is the identity sequence; it contains no conversion from
87
- `const A` to `A`. — *end example*]
88
-
89
- When the parameter has a class type and the argument expression has the
90
- same type, the implicit conversion sequence is an identity conversion.
91
- When the parameter has a class type and the argument expression has a
92
- derived class type, the implicit conversion sequence is a
93
- derived-to-base conversion from the derived class to the base class. A
94
- derived-to-base conversion has Conversion rank [[over.ics.scs]].
95
 
96
  [*Note 4*: There is no such standard conversion; this derived-to-base
97
  conversion exists only in the description of implicit conversion
98
  sequences. — *end note*]
99
 
 
 
 
 
 
 
 
100
  When the parameter is the implicit object parameter of a static member
101
  function, the implicit conversion sequence is a standard conversion
102
  sequence that is neither better nor worse than any other standard
103
  conversion sequence.
104
 
105
  In all contexts, when converting to the implicit object parameter or
106
  when converting to the left operand of an assignment operation only
107
  standard conversion sequences are allowed.
108
 
109
- [*Note 5*: When converting to the explicit object parameter, if any,
110
- user-defined conversion sequences are allowed. — *end note*]
111
 
112
  If no conversions are required to match an argument to a parameter type,
113
  the implicit conversion sequence is the standard conversion sequence
114
  consisting of the identity conversion [[over.ics.scs]].
115
 
 
9
 
10
  Implicit conversion sequences are concerned only with the type,
11
  cv-qualification, and value category of the argument and how these are
12
  converted to match the corresponding properties of the parameter.
13
 
14
+ [*Note 1*: Other properties, such as the lifetime, storage duration,
15
+ linkage, alignment, accessibility of the argument, whether the argument
16
+ is a bit-field, and whether a function is deleted
17
+ [[dcl.fct.def.delete]], are ignored. So, although an implicit conversion
18
+ sequence can be defined for a given argument-parameter pair, the
19
+ conversion from the argument to the parameter might still be ill-formed
20
+ in the final analysis. — *end note*]
21
 
22
  A well-formed implicit conversion sequence is one of the following
23
  forms:
24
 
25
  - a standard conversion sequence [[over.ics.scs]],
 
76
  [*Note 3*: When the parameter has a class type, this is a conceptual
77
  conversion defined for the purposes of [[over]]; the actual
78
  initialization is defined in terms of constructors and is not a
79
  conversion. — *end note*]
80
 
81
+ When the cv-unqualified version of the type of the argument expression
82
+ is the same as the parameter type, the implicit conversion sequence is
83
+ an identity conversion. When the parameter has a class type and the
84
+ argument expression has a (possibly cv-qualified) derived class type,
85
+ the implicit conversion sequence is a derived-to-base conversion from
86
+ the derived class to the base class. A derived-to-base conversion has
87
+ Conversion rank [[over.ics.scs]].
 
 
 
 
 
 
 
88
 
89
  [*Note 4*: There is no such standard conversion; this derived-to-base
90
  conversion exists only in the description of implicit conversion
91
  sequences. — *end note*]
92
 
93
+ [*Example 2*: An implicit conversion sequence from an argument of type
94
+ `const A` to a parameter of type `A` can be formed, even if overload
95
+ resolution for copy-initialization of `A` from the argument would not
96
+ find a viable function [[over.match.ctor]], [[over.match.viable]]. The
97
+ implicit conversion sequence for that case is the identity sequence; it
98
+ contains no “conversion” from `const A` to `A`. — *end example*]
99
+
100
  When the parameter is the implicit object parameter of a static member
101
  function, the implicit conversion sequence is a standard conversion
102
  sequence that is neither better nor worse than any other standard
103
  conversion sequence.
104
 
105
  In all contexts, when converting to the implicit object parameter or
106
  when converting to the left operand of an assignment operation only
107
  standard conversion sequences are allowed.
108
 
109
+ [*Note 5*: When a conversion to the explicit object parameter occurs,
110
+ it can include user-defined conversion sequences. — *end note*]
111
 
112
  If no conversions are required to match an argument to a parameter type,
113
  the implicit conversion sequence is the standard conversion sequence
114
  consisting of the identity conversion [[over.ics.scs]].
115