Title
Value-dependent address of static data member of class template
Status
c++17
Section
13.8.3.4 [temp.dep.constexpr]
Submitter
Richard Smith

Created on 2015-03-16.00:00:00 last changed 81 months ago

Messages

Date: 2016-11-15.00:00:00

[Moved to DR at the November, 2016 meeting.]

Date: 2016-06-15.00:00:00

Proposed resolution (June, 2016):

Change 13.8.3.4 [temp.dep.constexpr] paragraph 5 as follows:

An expression of the form &qualified-id where the qualified-id names a dependent member of the current instantiation is value-dependent. An expression of the form

    &cast-expression

is also value-dependent if evaluating cast-expression as a core constant expression (7.7 [expr.const]) succeeds and the result of the evaluation refers to a templated entity that is an object with static or thread storage duration or a member function.

Date: 2015-03-16.00:00:00

According to bullet 2.4 of 13.8.3.4 [temp.dep.constexpr], an id-expression is value-dependent if

  • it names a static data member that is a dependent member of the current instantiation and is not initialized in a member-declarator,

This implies that the address of an initialized static data member is not value-dependent, which is incorrect.

History
Date User Action Args
2018-02-27 00:00:00adminsetmessages: + msg6169
2018-02-27 00:00:00adminsetstatus: dr -> c++17
2017-02-06 00:00:00adminsetmessages: + msg6094
2017-02-06 00:00:00adminsetstatus: open -> dr
2015-03-16 00:00:00admincreate