It seems to me that using unanchored namespaces is just asking for trouble later when someone puts in a new namespace that happens to have the same name as a root level name
why do people always say std::
Not always. I use string and using ::std::string. So nothing bad if there will be fred::std::string, because I still use std::string. In small cpp-files it could be even using namespace ::std. Sample:
#include
using ::std::string;
//using namespace ::std; // good for small cpp-files
int main()
{
string s = "sometext"; // no leading ::std
}
you should just never name a namespace std
Yes, you shouldn't give a name std to custom namespace.