|
1479 | 1479 | \pnum
|
1480 | 1480 | When objects of non-aggregate class type \tcode{T} are
|
1481 | 1481 | list-initialized such that \ref{dcl.init.list} specifies that overload resolution
|
1482 |
| -is performed according to the rules in this subclause, overload resolution selects the |
1483 |
| -constructor in two phases: |
| 1482 | +is performed according to the rules in this subclause |
| 1483 | +or when forming a list-initialization sequence according to \ref{over.ics.list}, |
| 1484 | +overload resolution selects the constructor in two phases: |
1484 | 1485 |
|
1485 | 1486 | \begin{itemize}
|
1486 | 1487 | \item
|
1487 |
| -Initially, the candidate functions are the initializer-list constructors\iref{dcl.init.list} |
| 1488 | +If the initializer list is not empty or \tcode{T} has no default constructor, |
| 1489 | +overload resolution is first performed |
| 1490 | +where the candidate functions are the initializer-list constructors\iref{dcl.init.list} |
1488 | 1491 | of the class \tcode{T} and
|
1489 | 1492 | the argument list consists of the initializer list as a single argument.
|
1490 | 1493 |
|
1491 | 1494 | \item
|
1492 |
| -If no viable initializer-list constructor is found, overload resolution is |
| 1495 | +Otherwise, or if no viable initializer-list constructor is found, |
| 1496 | +overload resolution is |
1493 | 1497 | performed again, where the candidate functions are all the constructors of
|
1494 | 1498 | the class \tcode{T} and
|
1495 | 1499 | the argument list consists of the elements of the initializer list.
|
1496 | 1500 | \end{itemize}
|
1497 | 1501 |
|
1498 |
| -If the initializer list has no elements and \tcode{T} has a default constructor, |
1499 |
| -the first phase is omitted. |
1500 | 1502 | In copy-list-initialization, if an explicit constructor is
|
1501 | 1503 | chosen, the initialization is ill-formed.
|
1502 | 1504 | \begin{note}
|
|
0 commit comments