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
2167. Non-member references with lifetimes within the current evaluationSection: 7.7 [expr.const] Status: CD4 Submitter: Richard Smith Date: 2015-08-11[Adopted at the February, 2016 meeting.]
The current wording of 7.7 [expr.const] bullet 2.9 says:
an id-expression that refers to a variable or data member of reference type unless the reference has a preceding initialization and either
it is initialized with a constant expression or
it is a non-static data member of an object whose lifetime began within the evaluation of e;
This incorrectly excludes non-member references whose lifetime began within the current evaluation.
Proposed resolution (February, 2016):
Change 7.7 [expr.const] bullet 2.9.2 as follows:
A conditional-expression e is a core constant expression unless the evaluation of e, following the rules of the abstract machine (6.10.1 [intro.execution]), would evaluate one of the following expressions:
...
an id-expression that refers to a variable or data member of reference type unless the reference has a preceding initialization and either
it is initialized with a constant expression or
it is a non-static data member of an object whose its lifetime began within the evaluation of e;
...
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