You're right about "enum class", but anonymous classes and structs are perfectly valid in C++:
https://godbolt.org/z/7MbcqhnoK
struct S { struct { int x; }; };
warning: ISO C++ prohibits anonymous structs [-Wpedantic]
You're right about "enum class", but anonymous classes and structs are perfectly valid in C++:
https://godbolt.org/z/7MbcqhnoK