| 1 | namespace a { |
| 2 | namespace b { |
| 3 | namespace c { |
| 4 | static int d = 12; |
| 5 | enum Color { Red, Green, Blue }; |
| 6 | } // namespace c |
| 7 | } // namespace b |
| 8 | } // namespace a |
| 9 | |
| 10 | struct 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 | |
| 22 | A::B::C::EnumType A::B::C::enum_static = A::B::C::Eleven; |
| 23 | |
| 24 | int 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 | |
| 29 | int main() { |
| 30 | return foo(); // Stop here to evaluate expressions |
| 31 | } |
| 32 | |