Skip to content

Commit ce2f08a

Browse files
committed
[dcl.init] Merge new direct aggregate init wording into class direct
initialization bullet to avoid the wording being unreachable due to an "Otherwise" chain.
1 parent 691b7c1 commit ce2f08a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

source/declarations.tex

+12-6
Original file line numberDiff line numberDiff line change
@@ -4406,15 +4406,17 @@
44064406
constructors are considered.
44074407
The applicable constructors
44084408
are enumerated\iref{over.match.ctor}, and the best one is chosen
4409-
through overload resolution\iref{over.match}.
4410-
The constructor so selected
4409+
through overload resolution\iref{over.match}. Then:
4410+
\begin{itemize}
4411+
\item
4412+
If overload resolution is successful,
4413+
the selected constructor
44114414
is called to initialize the object, with the initializer
44124415
expression or \grammarterm{expression-list} as its argument(s).
4413-
If no constructor applies and the destination type is not an aggregate, or
4414-
the overload resolution is ambiguous, the initialization is ill-formed.
44154416
\item
4416-
Otherwise, if the destination type is
4417-
a (possibly cv-qualified) aggregate class \tcode{A} and
4417+
Otherwise, if no constructor is viable,
4418+
the destination type is
4419+
a (possibly cv-qualified) aggregate class \tcode{A}, and
44184420
the initializer is a parenthesized \grammarterm{expression-list},
44194421
the object is initialized as follows.
44204422
Let $e_1$, $\dotsc$, $e_n$ be the elements of the aggregate\iref{dcl.init.aggr}.
@@ -4454,6 +4456,10 @@
44544456
\end{codeblock}
44554457
\end{example}
44564458
\end{note}
4459+
\item
4460+
Otherwise, the initialization is ill-formed.
4461+
\end{itemize}
4462+
44574463
\item
44584464
Otherwise (i.e., for the remaining copy-initialization cases),
44594465
user-defined conversions that can convert from the

0 commit comments

Comments
 (0)