<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 1146</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="1146"></A><H4>1146.
  
<I>exception-specification</I>s of defaulted functions
</H4>
<B>Section: </B>11.4.7&#160; [<A href="https://wg21.link/class.dtor">class.dtor</A>]
 &#160;&#160;&#160;

 <B>Status: </B>C++11
 &#160;&#160;&#160;

 <B>Submitter: </B>GB
 &#160;&#160;&#160;

 <B>Date: </B>2010-08-03<BR><BR>


<P>[Voted into the WP at the November, 2010 meeting.]</P>

<A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3296.html#GB39">N3092 comment
  GB&#160;39<BR></A>
<A href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3296.html#GB41">N3092 comment
  GB&#160;41<BR></A>

<P>The note in 11.4.7 [<A href="https://wg21.link/class.dtor#4">class.dtor</A>] paragraph 4 says,</P>

<BLOCKQUOTE>

An explictly defaulted definition has no implicit
<I>exception-specification</I>.

</BLOCKQUOTE>

<P>There are similar notes in 11.4.5.3 [<A href="https://wg21.link/class.copy.ctor">class.copy.ctor</A>] paragraphs
15 and 29.</P>

<P>However, 9.6.2 [<A href="https://wg21.link/dcl.fct.def.default#2.4">dcl.fct.def.default</A>] bullet 2.4 says that
a special member function that is explicitly defaulted on its first
declaration</P>

<BLOCKQUOTE>

is implicitly considered to have the same
<I>exception-specification</I> as if it had been implicitly
declared (14.5 [<A href="https://wg21.link/except.spec">except.spec</A>])

</BLOCKQUOTE>

<P>The notes are incorrect.</P>

<P><B>Proposed resolution (August, 2010):</B></P>

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

<BLOCKQUOTE>

[<I>Note:</I> an implicitly- declared destructor has an
exception-specification (15.4).  <DEL>An explictly defaulted
definition has no implicit
exception-specification.</DEL> &#8212;<I>end note</I>]

</BLOCKQUOTE>

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

<BLOCKQUOTE>

[<I>Note:</I> an implicitly-declared copy/move constructor
has an exception-specification (15.4).  <DEL>An
explicitly-defaulted definition (8.4.2) has no implicit
exception-specification.</DEL> &#8212;<I>end note</I>]

</BLOCKQUOTE>

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

<BLOCKQUOTE>

[<I>Note:</I> An implicitly-declared copy/move assignment
operator has an exception- specification (15.4). <DEL>An
explicitly-defaulted definition has no implicit
exception-specification.</DEL> &#8212;<I>end note</I>]

</BLOCKQUOTE>

</OL>

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