Skip to content

Commit d863476

Browse files
jensmaurerzygoloid
authored andcommitted
P1975R0 Fixing the wording of parenthesized aggregate-initialization
Related to NB US 056 (C++20 CD)
1 parent 0d995ab commit d863476

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
@@ -3672,10 +3672,14 @@
36723672
\pnum
36733673
An expression \tcode{e} can be explicitly converted to a type \tcode{T}
36743674
if there is an implicit conversion sequence\iref{over.best.ics}
3675-
from \tcode{e} to \tcode{T}, or
3675+
from \tcode{e} to \tcode{T},
36763676
if overload resolution for a direct-initialization\iref{dcl.init}
36773677
of an object or reference of type \tcode{T} from \tcode{e}
3678-
would find at least one viable function\iref{over.match.viable}.
3678+
would find at least one viable function\iref{over.match.viable}, or
3679+
if \tcode{T} is an aggregate type\iref{dcl.init.aggr}
3680+
having a first element \tcode{x} and
3681+
there is an implicit conversion sequence
3682+
from \tcode{e} to the type of \tcode{x}.
36793683
If \tcode{T} is a reference type, the effect is
36803684
the same as performing the declaration and initialization
36813685
\begin{codeblock}
@@ -3688,6 +3692,10 @@
36883692
The conversion is ill-formed when attempting to convert an
36893693
expression of class type to an inaccessible or ambiguous base class.
36903694
\end{note}
3695+
\begin{note}
3696+
If \tcode{T} is ``array of unknown bound of \tcode{U}'',
3697+
this direct-initialization defines the type of the expression as \tcode{U[1]}.
3698+
\end{note}
36913699

36923700
\pnum
36933701
Otherwise, the \tcode{static_cast} shall perform one of the conversions

0 commit comments

Comments
 (0)