
18 Jun
2009
18 Jun
'09
11:27 a.m.
Yeah, I've tripped over this MSVC bug as well. 'using namespace' in namespace scope 'leaks' out into file scope. It's pretty annoying because it still occurs over header file boundaries. The bug is still present in VC9, I believe, but I haven't tried 10 yet. (Microsoft knows it exists but declines to fix it in old compilers.)
I tried with VC10, the bug is no longer present -- at least, #include <list> namespace bar { using namespace std; template <typename x> struct xxx {}; } typedef list<int> foo; results in a compile error due to a missing identifier before < in the typedef list<int> line. Cheers, Anteru