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
1834. Constant initialization binding a reference to an xvalueSection: 6.10.3.2 [basic.start.static] Status: CD4 Submitter: Richard Smith Date: 2014-01-13[Moved to DR at the November, 2014 meeting.]
According to 6.10.3.2 [basic.start.static] paragraph 2,
Constant initialization is performed:
if each full-expression (including implicit conversions) that appears in the initializer of a reference with static or thread storage duration is a constant expression (7.7 [expr.const]) and the reference is bound to an lvalue designating an object with static storage duration or to a temporary (see 6.8.7 [class.temporary]);
...
This wording should also permit the reference to be bound to an xvalue, e.g., a subobject of a temporary, and not just to a complete temporary.
Proposed resolution (February, 2014):
Change 6.10.3.2 [basic.start.static] paragraph 2 as follows (note that this resolution incorporates the overlapping change from the resolution of issue 1299)::
...Constant initialization is performed:
if each full-expression (including implicit conversions) that appears in the initializer of a reference with static or thread storage duration is a constant expression (7.7 [expr.const]) and the reference is bound to an lvalue a glvalue designating an object with static storage duration, to a temporary object (see 6.8.7 [class.temporary]) or subobject thereof, or to a function;
...
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