Comment #10 on issue 195 by [email protected]: common.h should not have "using namespace std;"
http://code.google.com/p/protobuf/issues/detail?id=195
It sounds like the bug reported by Robin may be slightly different: If net/if.h happens to be #included before a protobuf header, then any reference to "map" in the protobuf headers will resolve to the "sturct map" defined in if.h instead of to std::map, because the compiler will prefer the declaration over the one imported via "using namespace".
One simple work-around would be to make sure to #include protobuf headers before net/if.h.
We might be able to fix this in the protobuf code by writing "using std::map;" immediately after "using namespace std;" -- this might convince the compiler that we really do prefer ::std::map over ::map. I'm not sure.
I think this should be opened as a separate bug, though. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
