Skip to content

Commit 07b5caa

Browse files
burblebeetkoeppe
authored andcommitted
CWG2619 Kind of initialization for a designated-initializer-list
1 parent bb4acc8 commit 07b5caa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/declarations.tex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4455,7 +4455,8 @@
44554455
as well as in argument passing, function return,
44564456
throwing an exception\iref{except.throw},
44574457
handling an exception\iref{except.handle},
4458-
and aggregate member initialization\iref{dcl.init.aggr},
4458+
and aggregate member initialization other than by a
4459+
\grammarterm{designated-initializer-clause}\iref{dcl.init.aggr},
44594460
is called
44604461
\defn{copy-initialization}.
44614462
\begin{note}
@@ -4798,7 +4799,7 @@
47984799
the initializer list is
47994800
a brace-enclosed \grammarterm{designated-initializer-list},
48004801
the element is initialized by the
4801-
\grammarterm{designated-initializer-list} \tcode{\{ }\placeholder{D}\tcode{ \}},
4802+
\grammarterm{braced-init-list} \tcode{\{ }\placeholder{D}\tcode{ \}},
48024803
where \placeholder{D} is the \grammarterm{designated-initializer-clause}
48034804
naming a member of the anonymous union member.
48044805
There shall be only one such \grammarterm{designated-initializer-clause}.
@@ -4826,6 +4827,11 @@
48264827
a narrowing conversion\iref{dcl.init.list} is required
48274828
to convert the expression, the program is ill-formed.
48284829
\begin{note}
4830+
If the initialization is by \grammarterm{designated-initializer-clause},
4831+
its form determines whether copy-initialization or direct-initialization
4832+
is performed.
4833+
\end{note}
4834+
\begin{note}
48294835
If an initializer is itself an initializer list,
48304836
the element is list-initialized, which will result in a recursive application
48314837
of the rules in this subclause if the element is an aggregate.

0 commit comments

Comments
 (0)