Comment #3 on issue 195 by jmccaskey: common.h should not have "using namespace std;"

Ok, it looks like this *is* a Visual C++ bug. I can simplify my test program down to the following and the errors still occur and the using namespace std does appear to leak out of it's proper scope. I can't reproduce the same behavior with gcc on osx.

I'll go look for possible VC++ hotfixes that may address the issue. Still might be
nice if this could be avoided for VC++ users.

// test.cpp : Defines the entry point for the console application.

#include <string>

namespace google {
namespace protobuf {

using namespace std;

namespace internal {

template <bool>
struct CompileAssert {

}  // namespace internal


template< class T >
void swap( T &a, T &b )
        T tmp = a;
        a = b;
        b = tmp;

int _tmain(int argc, _TCHAR* argv[])
        int one = 1;
        int two = 2;

        swap( one, two );
        return 0;

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to