Title
Deleted constexpr constructors and virtual base classes
Status
cd3
Section
9.2.6 [dcl.constexpr]
Submitter
Sean Hunt

Created on 2011-08-17.00:00:00 last changed 123 months ago

Messages

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):

Change 9.2.6 [dcl.constexpr] paragraph 4 as follows:

In a The definition of a constexpr constructor, each of the parameter types shall be a literal type. In addition, either its function-body shall be = delete or = default or it shall satisfy the following constraints:

  • the class shall not have any virtual base classes;

  • each of the parameter types shall be a literal type;

  • its function-body shall not be a function-try-block;

In addition, either its function-body shall be = delete or it shall satisfy the following constraints:

  • either its function-body shall be = default or the compound-statement of its function-body shall contain only...

Date: 2011-08-17.00:00:00

The requirement that a class with a constexpr constructor cannot have a virtual base only applies to constructors with non-deleted and non-defaulted function-bodys. This seems like an oversight.

History
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: + msg3800
2012-02-27 00:00:00adminsetstatus: ready -> dr
2011-09-06 00:00:00adminsetmessages: + msg3449
2011-08-17 00:00:00admincreate