Title
Non-member references with lifetimes within the current evaluation
Status
cd4
Section
7.7 [expr.const]
Submitter
Richard Smith

Created on 2015-08-11.00:00:00 last changed 94 months ago

Messages

Date: 2016-02-15.00:00:00

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.9.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;

  • ...

Date: 2016-02-15.00:00:00

[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.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: tentatively ready -> cd4
2016-02-15 00:00:00adminsetmessages: + msg5700
2016-02-15 00:00:00adminsetstatus: drafting -> tentatively ready
2015-08-11 00:00:00admincreate