Why does everybody use unanchored namespace declarations (i.e. std:: not ::std::)?

So, why do people always say std::
instead of ::std::

Probably because they never really had problems with ambiguity because of it.

Along the same lines: I never had to include “earth” in my address, and I’m not going to.

You have to draw the line somewhere, and this it is a reasonable assumption that others won’t make their own std namespaces, or at least that a library that does won’t be very popular. 🙂

Leave a Comment