Date
2016-02-15.00:00:00
Message id
5482

Content

[Adopted at the February, 2016 meeting.]

In an example like:

  extern int i;
  namespace {
    constexpr int& r = i;
  }
  inline int f() { return r; }

use of f() in multiple translation units results in an ODR violation because of use of the internal-linkage reference r. It would be helpful if 6.3 [basic.def.odr] paragraph 6 could be amended to “look through” a constexpr reference in determining whether an inline function violates the ODR or not.