tmp/tmprsbppg4l/{from.md → to.md}
RENAMED
|
@@ -2,33 +2,37 @@
|
|
| 2 |
|
| 3 |
Under the conditions specified in [[dcl.init]], as part of a
|
| 4 |
copy-initialization of an object of class type, a user-defined
|
| 5 |
conversion can be invoked to convert an initializer expression to the
|
| 6 |
type of the object being initialized. Overload resolution is used to
|
| 7 |
-
select the user-defined conversion to be invoked.
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
- The converting constructors ([[class.conv.ctor]]) of `T` are
|
| 15 |
candidate functions.
|
| 16 |
-
- When the type of the initializer expression is a class type “
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
possibly cv-qualified `T`
|
| 21 |
-
argument in the context of direct-initialization of an object
|
| 22 |
-
“*cv2* `T`”, explicit conversion functions are also
|
| 23 |
-
that are not hidden within `S` and yield a type
|
| 24 |
-
version is the same type as `T` or is a derived
|
| 25 |
-
candidate functions. Conversion functions that
|
| 26 |
-
`X`” return lvalues or xvalues, depending on the
|
| 27 |
-
type `X` and are therefore considered to yield
|
| 28 |
-
selecting candidate functions.
|
| 29 |
|
| 30 |
In both cases, the argument list has one argument, which is the
|
| 31 |
-
initializer expression.
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
| 34 |
|
|
|
|
| 2 |
|
| 3 |
Under the conditions specified in [[dcl.init]], as part of a
|
| 4 |
copy-initialization of an object of class type, a user-defined
|
| 5 |
conversion can be invoked to convert an initializer expression to the
|
| 6 |
type of the object being initialized. Overload resolution is used to
|
| 7 |
+
select the user-defined conversion to be invoked.
|
| 8 |
+
|
| 9 |
+
[*Note 1*: The conversion performed for indirect binding to a reference
|
| 10 |
+
to a possibly cv-qualified class type is determined in terms of a
|
| 11 |
+
corresponding non-reference copy-initialization. — *end note*]
|
| 12 |
+
|
| 13 |
+
Assuming that “*cv1* `T`” is the type of the object being initialized,
|
| 14 |
+
with `T` a class type, the candidate functions are selected as follows:
|
| 15 |
|
| 16 |
- The converting constructors ([[class.conv.ctor]]) of `T` are
|
| 17 |
candidate functions.
|
| 18 |
+
- When the type of the initializer expression is a class type “cv `S`”,
|
| 19 |
+
the non-explicit conversion functions of `S` and its base classes are
|
| 20 |
+
considered. When initializing a temporary to be bound to the first
|
| 21 |
+
parameter of a constructor where the parameter is of type “reference
|
| 22 |
+
to possibly cv-qualified `T`” and the constructor is called with a
|
| 23 |
+
single argument in the context of direct-initialization of an object
|
| 24 |
+
of type “*cv2* `T`”, explicit conversion functions are also
|
| 25 |
+
considered. Those that are not hidden within `S` and yield a type
|
| 26 |
+
whose cv-unqualified version is the same type as `T` or is a derived
|
| 27 |
+
class thereof are candidate functions. Conversion functions that
|
| 28 |
+
return “reference to `X`” return lvalues or xvalues, depending on the
|
| 29 |
+
type of reference, of type `X` and are therefore considered to yield
|
| 30 |
+
`X` for this process of selecting candidate functions.
|
| 31 |
|
| 32 |
In both cases, the argument list has one argument, which is the
|
| 33 |
+
initializer expression.
|
| 34 |
+
|
| 35 |
+
[*Note 2*: This argument will be compared against the first parameter
|
| 36 |
+
of the constructors and against the implicit object parameter of the
|
| 37 |
+
conversion functions. — *end note*]
|
| 38 |
|