Status: New Owner: [email protected] Labels: Type-Defect Priority-Medium
New issue 195 by jmccaskey: common.h should not have "using namespace std;" http://code.google.com/p/protobuf/issues/detail?id=195 I have a project I'm considering using protocol buffers for, but this project doesn't currently use the standard c++ container classes or algorithms. In fact we have some name collisions with the std namespace, so in the few places we do use it we must always fully qualify names with std::. In testing out Protocol Buffers for our project we found that google/protobuf/stubs/common.h which is included by the generated .pb.h files ends up using the std namespace which then affects lots of our downstream code negatively. I've locally removed the using directive and added it to each .cpp instead, fixing up the .h's to fully qualify names with std::. Seems like it would be best practice to remove the using directive from common.h in the official build though instead of assuming everyone wants to have the std namespace automatically used in their projects. We'd love to see that happen so merging new versions won't be a nightmare for us in the future if we go with Protocol Buffers in our project. -- 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.
