https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756
--- Comment #7 from Andrew Pinski ---
Note the paper that was acepted in the end is https://wg21.link/p2280 .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756
Jonathan Wakely changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756
--- Comment #5 from Jonathan Wakely ---
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. Usin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756
--- Comment #4 from Andrew Pinski ---
https://wg21.link/p2280r2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756
Andrew Pinski changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756
--- Comment #2 from Claas ---
No. See the live demo at
http://coliru.stacked-crooked.com/a/79f0d052864fec19
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72756
--- Comment #1 from Andrew Pinski ---
I suspect it is rejected at instantation time rather than definition time.