Title
constexpr variable template declarations
Status
cd4
Section
9.2.6 [dcl.constexpr]
Submitter
Richard Smith

Created on 2013-07-08.00:00:00 last changed 49 months ago

Messages

Date: 2014-11-15.00:00:00

[Moved to DR at the November, 2014 meeting.]

Date: 2014-02-15.00:00:00

Proposed resolution (February, 2014):

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

...If any declaration of a function, or function template, or variable template has a constexpr specifier, then all its declarations shall contain the constexpr specifier. [Note:...
Date: 2013-07-08.00:00:00

According to 9.2.6 [dcl.constexpr] paragraph 1,

If any declaration of a function, function template, or variable template has a constexpr specifier, then all its declarations shall contain the constexpr specifier.

This requirement does not make sense applied to variable templates. The constexpr specifier requires that there be an initializer, and a variable template declaration with an initializer is a definition, so there cannot be more than one declaration of a variable template with the constexpr specifier.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-05-25 00:00:00adminsetstatus: dr -> drwp
2015-04-13 00:00:00adminsetmessages: + msg5358
2014-11-24 00:00:00adminsetstatus: ready -> dr
2014-03-03 00:00:00adminsetmessages: + msg4820
2014-03-03 00:00:00adminsetstatus: drafting -> ready
2013-10-14 00:00:00adminsetstatus: open -> drafting
2013-07-08 00:00:00admincreate