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
2647. Fix for "needed for constant evaluation"Section: 7.7 [expr.const] Status: C++23 Submitter: US Date: 2022-11-03[Accepted as a DR at the November, 2022 meeting.]
The criteria for a variable to be needed for constant evaluation are inconsistent with those for it to be usable in constant expressions (/4).
Proposed resolution (approved by CWG 2022-11-08):
Change in 7.7 [expr.const] paragraph 3 as follows:
A variable is potentially-constant if it is constexpr or it has reference or non-volatile const-qualified integral or enumeration type.
Change in 7.7 [expr.const] paragraph 16.7 as follows:
A function or variable is needed for constant evaluation if it is:
- a constexpr function that is named by an expression (6.3) that is potentially constant evaluated, or
- a potentially-constant variable named by a potentially constant evaluated expression that is either a constexpr variable or is of non-volatile const-qualified integral type or of reference type.
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