[webkit-dev] Using namespace std

Alexey Proskuryakov ap at webkit.org
Wed May 16 09:57:23 PDT 2012


16.05.2012, в 9:20, Allan Sandfeld Jensen написал(а):

> We can work around issues like this, but I would still prefer if we advised 
> against 'using namespace std', as seen even more clearly in the 'bind' case, 
> it can easily cause problems when upgrading standard libraries or compilers.

Having read the entire thread, I'm still not sure about the rationale. Sorry if I overlooked the answer.

If anything, the more specific using declaration (using std::foo) is worse than the using directive (using namespace std) as far as conflicts go. A using directive doesn't add a name to containing namespace, so you can always disambiguate later, unlike with using declaration, which can create unsolvable conflicts.

- WBR, Alexey Proskuryakov



More information about the webkit-dev mailing list