Skip to content

Commit 7e4a9fb

Browse files
jensmaurerzygoloid
authored andcommitted
[over.match.list] Acknowledge [over.ics.list] and clarify text.
1 parent bddd47c commit 7e4a9fb

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

source/overloading.tex

+8-6
Original file line numberDiff line numberDiff line change
@@ -1479,24 +1479,26 @@
14791479
\pnum
14801480
When objects of non-aggregate class type \tcode{T} are
14811481
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:
14841485

14851486
\begin{itemize}
14861487
\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}
14881491
of the class \tcode{T} and
14891492
the argument list consists of the initializer list as a single argument.
14901493

14911494
\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
14931497
performed again, where the candidate functions are all the constructors of
14941498
the class \tcode{T} and
14951499
the argument list consists of the elements of the initializer list.
14961500
\end{itemize}
14971501

1498-
If the initializer list has no elements and \tcode{T} has a default constructor,
1499-
the first phase is omitted.
15001502
In copy-list-initialization, if an explicit constructor is
15011503
chosen, the initialization is ill-formed.
15021504
\begin{note}

0 commit comments

Comments
 (0)