Title
exception-specifications of defaulted functions
Status
c++11
Section
11.4.7 [class.dtor]
Submitter
GB

Created on 2010-08-03.00:00:00 last changed 130 months ago

Messages

Date: 2010-11-15.00:00:00

[Voted into the WP at the November, 2010 meeting.]

Date: 2010-08-15.00:00:00

Proposed resolution (August, 2010):

  1. Change 11.4.7 [class.dtor] paragraph 4 as follows:

  2. [Note: an implicitly- declared destructor has an exception-specification (15.4). An explictly defaulted definition has no implicit exception-specification.end note]
  3. Change 11.4.5.3 [class.copy.ctor] paragraph 15 as follows:

  4. [Note: an implicitly-declared copy/move constructor has an exception-specification (15.4). An explicitly-defaulted definition (8.4.2) has no implicit exception-specification.end note]
  5. Change 11.4.5.3 [class.copy.ctor] paragraph 29 as follows:

  6. [Note: An implicitly-declared copy/move assignment operator has an exception- specification (15.4). An explicitly-defaulted definition has no implicit exception-specification.end note]
Date: 2022-02-18.07:47:23
N3092 comment GB 39
N3092 comment GB 41

The note in 11.4.7 [class.dtor] paragraph 4 says,

An explictly defaulted definition has no implicit exception-specification.

There are similar notes in 11.4.5.3 [class.copy.ctor] paragraphs 15 and 29.

However, 9.5.2 [dcl.fct.def.default] bullet 2.4 says that a special member function that is explicitly defaulted on its first declaration

is implicitly considered to have the same exception-specification as if it had been implicitly declared (14.5 [except.spec])

The notes are incorrect.

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetstatus: dr -> fdis
2010-11-29 00:00:00adminsetmessages: + msg3184
2010-11-29 00:00:00adminsetstatus: ready -> dr
2010-08-23 00:00:00adminsetmessages: + msg2793
2010-08-03 00:00:00admincreate