This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117b. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-08-11
457. Wording nit on use of const variables in constant expressionsSection: 7.7 [expr.const] Status: CD1 Submitter: Mark Mitchell Date: 03 Feb 2004[Voted into WP at April 2005 meeting.]
I'm looking at 7.7 [expr.const]. I see:
An integral constant-expression can involve only ... const variables or static data members of integral or enumeration types initialized with constant expressions ...
Shouldn't that be "const non-volatile"?
It seems weird to say that:
const volatile int i = 3; int j[i];is valid.
Steve Adamczyk: See issue 76, which made the similar change to 9.2.9.2 [dcl.type.cv] paragraph 2, and probably should have changed this one as well.
Proposed resolution (October, 2004):
Change the first sentence in the second part of 7.7 [expr.const] paragraph 1 as follows:
An integral constant-expression can involve only literals of arithmetic types (5.13 [lex.literal], 6.9.2 [basic.fundamental]), enumerators, non-volatileconst variables or static data members of integral or enumeration types initialized with constant expressions (9.5 [dcl.init]), non-type template parameters of integral or enumeration types, and sizeof expressions.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4