https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77598
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jason at gcc dot gnu.org, | |redi at gcc dot gnu.org Summary|consexpr compilation |constexpr compilation |failure on reference type |failure on reference type |casting |casting --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This error has been added for DR1188 resolution. Slightly reduced testcase: template <typename T> struct A { static constexpr T a = T (); }; template <typename T> constexpr T A<T>::a; struct B { int b; constexpr int foo () const { return b; } constexpr B (const int &x) : b(x) {}; }; struct C : public B { constexpr C () : B(50) {}; }; struct D : public C { }; struct E { static constexpr const auto &e = A<D>::a; }; constexpr const B &f = E::e; constexpr const int g = f.foo ();