<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1633</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="1633"></A><H4>1633.
  
Copy-initialization in member initialization
</H4>
<B>Section: </B>9.5&#160; [<A href="https://wg21.link/dcl.init">dcl.init</A>]
 &#160;&#160;&#160;

 <B>Status: </B>CD4
 &#160;&#160;&#160;

 <B>Submitter: </B>Vinny Romano
 &#160;&#160;&#160;

 <B>Date: </B>2013-03-04<BR>


<P>[Moved to DR at the November, 2014 meeting.]</P>



<P>According to 9.5 [<A href="https://wg21.link/dcl.init#16">dcl.init</A>] paragraph 16,</P>

<BLOCKQUOTE>

<P>The initialization that occurs in the forms</P>

<PRE>
  T x(a);
  T x{a};
</PRE>

<P>as well as in new expressions
(7.6.2.8 [<A href="https://wg21.link/expr.new">expr.new</A>]), <TT>static_cast</TT> expressions
(7.6.1.9 [<A href="https://wg21.link/expr.static.cast">expr.static.cast</A>]), functional notation type conversions
(7.6.1.4 [<A href="https://wg21.link/expr.type.conv">expr.type.conv</A>]), and base and member initializers
(11.9.3 [<A href="https://wg21.link/class.base.init">class.base.init</A>]) is called <I>direct-initialization</I>.</P>

</BLOCKQUOTE>

<P>This wording was overlooked when <I>brace-or-equal-initializer</I>s
were added to the language, permitting copy-initialization of members
by use of the <TT>=</TT> form.</P>

<P><B>Proposed resolution (April, 2013):</B></P>

<P>Change 9.5 [<A href="https://wg21.link/dcl.init">dcl.init</A>] paragraphs 15-16 as follows,
removing the example in paragraph 15 and making it a single running
sentence:</P>

<BLOCKQUOTE>

<P>The initialization that occurs in the <INS><TT>=</TT></INS> form
<INS>of a <I>brace-or-equal-initializer</I> or <I>condition</I>
(8.5 [<A href="https://wg21.link/stmt.select">stmt.select</A>]),</INS>
</P>

<PRE>
<DEL>  T x = a;</DEL>
</PRE>

<P>as well as in argument passing, function return, throwing an exception
(14.2 [<A href="https://wg21.link/except.throw">except.throw</A>]), handling an exception
(14.4 [<A href="https://wg21.link/except.handle">except.handle</A>]), and aggregate member initialization
(9.5.2 [<A href="https://wg21.link/dcl.init.aggr">dcl.init.aggr</A>])<INS>,</INS> is
called <I>copy-initialization</I>. [<I>Note:</I> Copy-initialization may
invoke a move (12.8). &#8212;<I>end note</I>]</P>

<P>The initialization that occurs in the forms</P>

<PRE>
  T x(a);
  T x{a};
</PRE>

<P>as well as in <TT>new</TT> expressions
(7.6.2.8 [<A href="https://wg21.link/expr.new">expr.new</A>]), <TT>static_cast</TT> expressions (5.2.9),
functional notation type conversions (7.6.1.4 [<A href="https://wg21.link/expr.type.conv">expr.type.conv</A>]),
<DEL>and base and member
initializers</DEL> <INS><I>mem-initializer</I>s</INS>
(11.9.3 [<A href="https://wg21.link/class.base.init">class.base.init</A>])<INS>, and the <I>braced-init-list</I> form
of a <I>condition</I></INS> is called <I>direct-initialization</I>.</P>

</BLOCKQUOTE>

<BR><BR>
</BODY>
</HTML>
