Title
Volatile constexpr variables
Status
nad
Section
9.2.6 [dcl.constexpr]
Submitter
Daniel Krügler

Created on 2013-05-18.00:00:00 last changed 128 months ago

Messages

Date: 2013-09-15.00:00:00

Rationale (September, 2013):

The combination is intentionally permitted and could be used in some circumstances to force constant initialization.

Date: 2022-11-20.07:54:16

There does not appear to be language in the current wording stating that constexpr cannot be applied to a variable of volatile-qualified type. Also, the wording in 7.7 [expr.const] paragraph 2 referring to “a non-volatile object defined with constexpr” might lead one to infer that the combination is permitted but that such a variable cannot appear in a constant expression. What is the intent?

History
Date User Action Args
2013-10-14 00:00:00adminsetmessages: + msg4707
2013-10-14 00:00:00adminsetstatus: open -> nad
2013-05-18 00:00:00admincreate