<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1888</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="1888"></A><H4>1888.
  
Implicitly-declared default constructors and <TT>explicit</TT>
</H4>
<B>Section: </B>11.4.5&#160; [<A href="https://wg21.link/class.ctor">class.ctor</A>]
 &#160;&#160;&#160;

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

 <B>Submitter: </B>Daniel Kr&#252;gler
 &#160;&#160;&#160;

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


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



<P>It used to be clear that an implicitly-declared default constructor
is not <TT>explicit</TT>.  That has been inadvertently lost due to other
changes, so this specification should be added to 11.4.5 [<A href="https://wg21.link/class.ctor">class.ctor</A>]
in parallel with the similar statement in 11.4.5.3 [<A href="https://wg21.link/class.copy.ctor#3">class.copy.ctor</A>] paragraph 3.
</P>

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

<OL>
<LI><P>Change 11.4.5 [<A href="https://wg21.link/class.ctor#4">class.ctor</A>] paragraph 4 as follows:</P></LI>

<BLOCKQUOTE>

A <I>default</I> constructor for a class <TT>X</TT> is a
constructor of class <TT>X</TT> that can be called without
an argument. If there is no user-declared constructor for
class <TT>X</TT>, a <INS>non-<TT>explicit</TT></INS>
constructor having no parameters is implicitly declared as
defaulted (9.6 [<A href="https://wg21.link/dcl.fct.def">dcl.fct.def</A>]). An implicitly-declared
default constructor...

</BLOCKQUOTE>

<LI><P>Change 11.4.8.2 [<A href="https://wg21.link/class.conv.ctor#3">class.conv.ctor</A>] paragraph 3 as follows:</P></LI>

<BLOCKQUOTE>

A non-explicit copy/move constructor
(11.4.5.3 [<A href="https://wg21.link/class.copy.ctor">class.copy.ctor</A>]) is a converting
constructor. <INS>[<I>Note:</I></INS> An implicitly-declared
copy/move constructor is not an explicit constructor; it may
be called for implicit type conversions. <INS>&#8212;<I>end
note</I>]</INS>

</BLOCKQUOTE>

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

<BLOCKQUOTE>

If the class definition does not explicitly declare a copy
constructor, <INS>a non-<TT>explicit</TT></INS> one is
declared <I>implicitly</I>. If the class...

</BLOCKQUOTE>

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

<BLOCKQUOTE>

If the definition of a class <TT>X</TT> does not explicitly
declare a move constructor, <INS>a
non-<TT>explicit</TT></INS> one will be implicitly declared
as defaulted if and only if...

</BLOCKQUOTE>

</OL>

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