36 points · by leohotfn · 9y ago · 23 comments
using std::string;
It's not cool to impose that decision on clients of the library.
This should almost always be ok since no sane programmer should ever name their class string in the namespace of std.
As a developer, I wouldn't feel too bad about causing namespace conflicts in this manner because hopefully it will suggest to the maintainer that their class name is a poor choice.
He really shouldn't do that in a header, but if he at least moved it down a couple of lines so it's inside his private namespace, it at least wouldn't affect anyone else. There is no good reason to do it globally.
Talks in-depth about the thread library and also other C++11 features that made it possible. Highly recommended.