Skip to content

Commit 5009182

Browse files
committed
P1975R0 Fixing the wording of parenthesized aggregate-initialization
Related to NB US 056 (C++20 CD)
1 parent 81f1d68 commit 5009182

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

source/expressions.tex

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3666,10 +3666,14 @@
36663666
\pnum
36673667
An expression \tcode{e} can be explicitly converted to a type \tcode{T}
36683668
if there is an implicit conversion sequence\iref{over.best.ics}
3669-
from \tcode{e} to \tcode{T}, or
3669+
from \tcode{e} to \tcode{T},
36703670
if overload resolution for a direct-initialization\iref{dcl.init}
36713671
of an object or reference of type \tcode{T} from \tcode{e}
3672-
would find at least one viable function\iref{over.match.viable}.
3672+
would find at least one viable function\iref{over.match.viable}, or
3673+
if \tcode{T} is an aggregate type\iref{dcl.init.aggr}
3674+
having a first element \tcode{x} and
3675+
there is an implicit conversion sequence
3676+
from \tcode{e} to the type of \tcode{x}.
36733677
If \tcode{T} is a reference type, the effect is
36743678
the same as performing the declaration and initialization
36753679
\begin{codeblock}
@@ -3682,6 +3686,10 @@
36823686
The conversion is ill-formed when attempting to convert an
36833687
expression of class type to an inaccessible or ambiguous base class.
36843688
\end{note}
3689+
\begin{note}
3690+
If \tcode{T} is ``array of unknown bound of \tcode{U}'',
3691+
this direct-initialization defines the type of the expression as \tcode{U[1]}.
3692+
\end{note}
36853693

36863694
\pnum
36873695
Otherwise, the \tcode{static_cast} shall perform one of the conversions

0 commit comments

Comments
 (0)