Title
Explicit qualification of constexpr member functions
Status
c++11
Section
9.2.6 [dcl.constexpr]
Submitter
Daniel Krügler

Created on 2009-04-06.00:00:00 last changed 130 months ago

Messages

Date: 2010-08-23.00:00:00

[Voted into WP at August, 2010 meeting.]

Date: 2010-02-15.00:00:00

Proposed resolution (February, 2010):

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

A constexpr specifier for a non-static member function that is not a constructor declares that member function to be const (11.4.3 [class.mfct.non.static]). [Note: the constexpr specifier has no other effect on the function type. —end note] The keyword const is ignored if it appears in the cv-qualifier-seq of the function declarator of the declaration of such a member function. The class of which that function is a member shall be a literal type (6.8 [basic.types]). [Example:...
Date: 2009-07-15.00:00:00

Notes from the July, 2009 meeting:

The CWG agreed that a const qualifier on a constexpr member function is simply redundant and not an error.

Date: 2009-04-06.00:00:00

9.2.6 [dcl.constexpr] paragraph 6 says,

A constexpr specifier for a non-static member function that is not a constructor declares that member function to be const (11.4.3 [class.mfct.non.static]).

Is a const qualifier on such a member function redundant or ill-formed?

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetstatus: wp -> fdis
2010-11-29 00:00:00adminsetstatus: dr -> wp
2010-08-23 00:00:00adminsetmessages: + msg2912
2010-08-23 00:00:00adminsetstatus: ready -> dr
2010-03-29 00:00:00adminsetstatus: review -> ready
2010-02-16 00:00:00adminsetmessages: + msg2534
2010-02-16 00:00:00adminsetstatus: drafting -> review
2009-08-03 00:00:00adminsetmessages: + msg2195
2009-08-03 00:00:00adminsetstatus: open -> drafting
2009-04-06 00:00:00admincreate