https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102201
Harald van Dijk <harald at gigawatt dot nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |harald at gigawatt dot nl --- Comment #1 from Harald van Dijk <harald at gigawatt dot nl> --- This doesn't need inner classes, a simpler reproducer is: struct S { int i; }; int j = sizeof S::i; gcc accepts this in all modes ever since the C++11 rule for non-static members in unevaluated contexts was implemented (4.4). clang says in C++98 mode: test.cc:2:19: error: invalid use of non-static data member 'i' int j = sizeof S::i; ~~~^ 1 error generated.