The following source code compiles correctly with Visual Studio 2010:
namespace NS { class X { }; XY(X str); } void myFun() { NS::X x; Y(x); }
(this is abbreviated code, where all my own class and function names are replaced by X, Y, ...)
I would expect the string Y(x) not to compile, since it should be NS::Y(x) .
This source code is compiled with the following command
cl /c file.cpp
There are no other files, there are no other command line options.
Why is this file compiling? Error in VS2010? Or something that I (and my 3 other colleagues) did not notice?
c ++ compiler-errors
Patrick
source share