https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced further, since it doesn't actually depend on templates:

struct S {
  enum { e = 4 };
};

int f(S& s)
{
  constexpr int i = s.e;
  return i;
}

This is only ill-formed because s is a reference. Using s.e is fine for a
non-reference.

Reply via email to