Incorrect exception specification for inherited constructors
_N4527_.12.9 [class.inhctor]

Created on 2011-08-16.00:00:00 last changed 90 months ago


Date: 2012-02-15.00:00:00

[Voted into the WP at the February, 2012 meeting; moved to DR at the October, 2012 meeting.]

Date: 2011-08-15.00:00:00

Proposed resolution (August, 2011):

  1. Delete the indicated bullet of _N4527_.12.9 [class.inhctor] paragraph 2:

    • the exception-specification (14.5 [except.spec]),
  2. Change _N4527_.12.9 [class.inhctor] paragraph 3 as follows:

  3. ...[Note: Default arguments are not inherited. An exception-specification is implied as specified in 14.5 [except.spec].end note]
  4. Change 14.5 [except.spec] paragraph 14 as follows:

  5. An inheriting constructor (_N4527_.12.9 [class.inhctor]) and an implicitly declared special member function (Clause 11.4.4 [special]) shall have an exception-specification. If f is an inheriting constructor or an implicitly declared default constructor, copy constructor, move constructor, destructor, copy assignment operator, or move assignment operator, its implicit exception-specification specifies the type-id T if and only if T is allowed by the exception-specification of a function directly invoked by f's implicit definition; f shall allow all exceptions if any function it directly invokes allows all exceptions, and f shall allow no exceptions if every function it directly invokes allows no exceptions. [Note: an instantiation of an inheriting constructor template has an implied exception-specification as if it were a non-template inheriting constructor. —end note] [Example:...
Date: 2016-02-15.00:00:00

According to _N4527_.12.9 [class.inhctor] paragraph 3, the exception specification for an inheriting constructor has the same exception specification as the inherited constructor. This ignores the exception specifications of default constructors for base classes and nonstatic data members and of functions called in brace-or-equals-initializers of nonstatic data members.

Date User Action Args
2014-03-03 00:00:00adminsetstatus: drwp -> cd3
2012-11-03 00:00:00adminsetstatus: dr -> drwp
2012-02-27 00:00:00adminsetmessages: + msg3828
2012-02-27 00:00:00adminsetstatus: ready -> dr
2011-09-06 00:00:00adminsetmessages: + msg3487
2011-08-16 00:00:00admincreate