32 lines · cpp
1namespace a {2namespace b {3namespace c {4static int d = 12;5enum Color { Red, Green, Blue };6} // namespace c7} // namespace b8} // namespace a9 10struct A {11 int _a = 'a';12 struct B {13 short _b = 'b';14 struct C {15 char _c = 'c';16 enum EnumType : int { Eleven = 11 };17 static EnumType enum_static;18 };19 };20};21 22A::B::C::EnumType A::B::C::enum_static = A::B::C::Eleven;23 24int foo() {25 a::b::c::Color color = a::b::c::Blue;26 return A::B::C::enum_static == a::b::c::d && ((int)color == 0);27}28 29int main() {30 return foo(); // Stop here to evaluate expressions31}32