This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See for the official list.


1987. constexpr static data members across translation units

Section:  []     Status: NAD     Submitter: Richard Smith     Date: 2014-08-22

Given an example like

  struct X {
    static constexpr const char *p = "foo";
  static const char *q = X::p;

if this appears in more than one translation unit, must the value of q be the same in each? The implication of the one-definition rule would be that it must be, but current implementations do not give that result.

Rationale (November, 2014):

The interpretation is correct and the implementations are incorrect.