fork(1) download
  1. struct X{};
  2.  
  3. struct Y
  4. {
  5. void Foo( X x ) // Here visible ::X
  6. {
  7. X new_x= x; // But here ::Y::X
  8. }
  9.  
  10. struct X{};
  11. };
  12.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In member function ‘void Y::Foo(X)’:
prog.cpp:7:12: error: conversion from ‘X’ to non-scalar type ‘Y::X’ requested
   X new_x= x; // But here ::Y::X
            ^
stdout
Standard output is empty