1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | namespace Parent { class A {}; namespace Nested { class A {}; } template <typename T> class B { A myA; }; } namespace Parent { using namespace Nested; void foo() { B<int> myB; } } int main() { return 0; } |
bmFtZXNwYWNlIFBhcmVudAp7CiAgY2xhc3MgQSB7fTsKIAogIG5hbWVzcGFjZSBOZXN0ZWQKICB7CiAgICBjbGFzcyBBIHt9OwogIH0KICAKICB0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4KICBjbGFzcyBCCiAgewogICAgQSBteUE7CiAgfTsKfQogCm5hbWVzcGFjZSBQYXJlbnQKewogIHVzaW5nIG5hbWVzcGFjZSBOZXN0ZWQ7CiAgCiAgdm9pZCBmb28oKQogIHsKICAgIEI8aW50PiBteUI7CiAgfQp9CiAKaW50IG1haW4oKSB7IHJldHVybiAwOyB9Cg==
prog.cpp: In function ‘void Parent::foo()’: prog.cpp:23: warning: unused variable ‘myB’
-
upload with new input
-
result: Success time: 0s memory: 2720 kB returned value: 0
Scope resolution for template instantiation


