<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1916</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="1916"></A><H4>1916.
  
&#8220;Same cv-unqualified type&#8221;
</H4>
<B>Section: </B>11.4.5.3&#160; [<A href="https://wg21.link/class.copy.ctor">class.copy.ctor</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Richard Smith
 &#160;&#160;&#160;

 <B>Date: </B>2014-04-18<BR>


<P>[Moved to DR at the May, 2015 meeting.]</P>



<P>11.4.5.3 [<A href="https://wg21.link/class.copy.ctor#31">class.copy.ctor</A>] paragraph 31 uses the phrase,
&#8220;same cv-unqualified type,&#8221; twice.  This is ambiguous,
potentially either requiring that the types not be cv-qualified or
meaning that cv-qualification should be ignored.  The latter meaning
is intended and the phrase should be replaced accordingly.</P>

<P><B>Proposed resolution (November, 2014):</B></P>

<P>Change 11.4.5.3 [<A href="https://wg21.link/class.copy.ctor#31">class.copy.ctor</A>] paragraph 31 as follows:</P>

<BLOCKQUOTE>

<P>...This elision of copy/move operations, called <I>copy elision</I>,
is permitted in the following circumstances (which may be
combined to eliminate multiple copies):</P>

<OL>
<LI><P>in a <TT>return</TT> statement in a function with
a class return type, when
the <DEL>expression</DEL> <INS><I>expression</I></INS> is
the name of a non-volatile automatic object (other than a
function <DEL>or catch-clause</DEL> parameter <INS>or a
variable introduced by the <I>exception-declaration</I> of
a <I>handler</I> (14.4 [<A href="https://wg21.link/except.handle">except.handle</A>])</INS>) with the same
<DEL>cv-unqualified</DEL> type <INS>(ignoring
cv-qualification)</INS> as the function return type, the
copy/move operation can be omitted by constructing the
automatic object directly into the function's return
value</P></LI>

<LI><P>in a <I>throw-expression</I>...</P></LI>

<LI><P>when a temporary class object that has not been bound to a
reference (6.8.7 [<A href="https://wg21.link/class.temporary">class.temporary</A>]) would be copied/moved
to a class object with the same <DEL>cv-unqualified</DEL> type
<INS>(ignoring cv-qualification)</INS>, the
copy/move operation can be omitted by constructing the
temporary object directly into the target of the omitted
copy/move</P></LI>

<LI><P>when the <I>exception-declaration</I>...</P></LI>

</OL>

</BLOCKQUOTE>

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