fork download
  1.  
  2. namespace B
  3. {
  4. struct X;
  5. }
  6. namespace A
  7. {
  8. struct X{};
  9. }
  10. namespace B
  11. {
  12. using A::X;
  13. }
  14. int main()
  15. {
  16. B::X x;
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:12: error: ‘X’ is already declared in this scope
prog.cpp: In function ‘int main()’:
prog.cpp:16: warning: unused variable ‘x’
stdout
Standard output is empty