tmp/tmpabgmy33u/{from.md → to.md}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
#### Initialization by list-initialization <a id="over.match.list">[[over.match.list]]</a>
|
| 2 |
|
| 3 |
-
When objects of non-aggregate class type `T` are list-initialized
|
| 4 |
-
[[dcl.init.list]]
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
- Initially, the candidate functions are the initializer-list
|
| 8 |
constructors ([[dcl.init.list]]) of the class `T` and the argument
|
| 9 |
list consists of the initializer list as a single argument.
|
| 10 |
- If no viable initializer-list constructor is found, overload
|
|
@@ -13,10 +14,12 @@ phases:
|
|
| 13 |
the elements of the initializer list.
|
| 14 |
|
| 15 |
If the initializer list has no elements and `T` has a default
|
| 16 |
constructor, the first phase is omitted. In copy-list-initialization, if
|
| 17 |
an `explicit` constructor is chosen, the initialization is ill-formed.
|
| 18 |
-
|
|
|
|
| 19 |
[[over.match.copy]]), where only converting constructors are considered
|
| 20 |
for copy-initialization. This restriction only applies if this
|
| 21 |
-
initialization is part of the final result of overload
|
|
|
|
| 22 |
|
|
|
|
| 1 |
#### Initialization by list-initialization <a id="over.match.list">[[over.match.list]]</a>
|
| 2 |
|
| 3 |
+
When objects of non-aggregate class type `T` are list-initialized such
|
| 4 |
+
that [[dcl.init.list]] specifies that overload resolution is performed
|
| 5 |
+
according to the rules in this section, overload resolution selects the
|
| 6 |
+
constructor in two phases:
|
| 7 |
|
| 8 |
- Initially, the candidate functions are the initializer-list
|
| 9 |
constructors ([[dcl.init.list]]) of the class `T` and the argument
|
| 10 |
list consists of the initializer list as a single argument.
|
| 11 |
- If no viable initializer-list constructor is found, overload
|
|
|
|
| 14 |
the elements of the initializer list.
|
| 15 |
|
| 16 |
If the initializer list has no elements and `T` has a default
|
| 17 |
constructor, the first phase is omitted. In copy-list-initialization, if
|
| 18 |
an `explicit` constructor is chosen, the initialization is ill-formed.
|
| 19 |
+
|
| 20 |
+
[*Note 1*: This differs from other situations ([[over.match.ctor]],
|
| 21 |
[[over.match.copy]]), where only converting constructors are considered
|
| 22 |
for copy-initialization. This restriction only applies if this
|
| 23 |
+
initialization is part of the final result of overload
|
| 24 |
+
resolution. — *end note*]
|
| 25 |
|