| 1 | namespace N |
| 2 | { |
| 3 | int n; |
| 4 | } |
| 5 | |
| 6 | namespace |
| 7 | { |
| 8 | int anon; |
| 9 | } |
| 10 | |
| 11 | namespace Nested |
| 12 | { |
| 13 | namespace |
| 14 | { |
| 15 | int nested; |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | namespace Global |
| 20 | { |
| 21 | int global; |
| 22 | } |
| 23 | |
| 24 | namespace Fun |
| 25 | { |
| 26 | int fun_var; |
| 27 | int fun() |
| 28 | { |
| 29 | fun_var = 5; |
| 30 | return 0; // break 1 |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | namespace Single |
| 35 | { |
| 36 | int single = 3; |
| 37 | } |
| 38 | |
| 39 | namespace NotImportedBefore |
| 40 | { |
| 41 | int not_imported = 45; |
| 42 | } |
| 43 | |
| 44 | using namespace Global; |
| 45 | |
| 46 | int not_imported = 35; |
| 47 | int fun_var = 9; |
| 48 | |
| 49 | namespace NotImportedAfter |
| 50 | { |
| 51 | int not_imported = 55; |
| 52 | } |
| 53 | |
| 54 | namespace Imported |
| 55 | { |
| 56 | int imported = 99; |
| 57 | } |
| 58 | |
| 59 | int imported = 89; |
| 60 | |
| 61 | int main() |
| 62 | { |
| 63 | using namespace N; |
| 64 | using namespace Nested; |
| 65 | using namespace Imported; |
| 66 | using Single::single; |
| 67 | n = 1; |
| 68 | anon = 2; |
| 69 | nested = 3; |
| 70 | global = 4; |
| 71 | return Fun::fun(); // break 0 |
| 72 | } |
| 73 | |