struct X{}; struct Y { void Foo( X x ) // Here visible ::X { X new_x= x; // But here ::Y::X } struct X{}; };
Standard input is empty
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 ^
Standard output is empty