Title
Static constexpr member functions for non-literal classes
Status
c++14
Section
9.2.6 [dcl.constexpr]
Submitter
Richard Smith

Created on 2013-05-15.00:00:00 last changed 81 months ago

Messages

Date: 2013-11-15.00:00:00

Proposed resolution (November, 2013):

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

The constexpr specifier has no effect on the type of a constexpr function or a constexpr constructor. The class of which a constexpr function is a member shall be a literal type (6.8 [basic.types]). [Example:...
Date: 2014-02-15.00:00:00

[Applied to WP at the February, 2014 meeting.]

The current wording of 9.2.6 [dcl.constexpr] paragraph 8 is:

The constexpr specifier has no effect on the type of a constexpr function or a constexpr constructor. The class of which a constexpr function is a member shall be a literal type (6.8 [basic.types]).

The previous version of this wording made clear that the restriction on the class type applied only to non-static member functions; consequently, the new formulation has inadvertently banned static constexpr member functions of non-literal classes.

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: accepted -> c++14
2014-03-03 00:00:00adminsetstatus: tentatively ready -> accepted
2014-01-20 00:00:00adminsetmessages: + msg4726
2014-01-20 00:00:00adminsetstatus: drafting -> tentatively ready
2013-10-14 00:00:00adminsetstatus: open -> drafting
2013-05-15 00:00:00admincreate