I looked into this some more and realized that the using namespace std
is inside the google protobuf namespace.  So you would _think_ that
the std declarations would only be visible inside protobuf namespace.
But this appears to be a bug in Visual Studio (at least with VS2k5,
not sure about other versions).  I've tried reproducing this in a
sample that does not involve google protobuf stuff, and I can't do
it.  So it seems like a very strange bug.  Making a minimal CPP file
with only a single main function demonstrates the problem.

#include <string>
#include <iostream>
#include "F:/dev/google/protobuf/stubs/common.h"

int main(int argc, char** argv)
{
    string test = "hello";
    cout << test;
    return 0;
}

But I can't reproduce this with a custom .h file of my own rather than
common.h.


I'll probably report it to Microsoft as a bug, but nevertheless it
would be nice if protobuf didn't do it. :(
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to