C++.Coding.Standards.1918.Rules.Guidelines [Electronic resources]

Herb Sutter, Andrei Alexandrescu

نسخه متنی -صفحه : 521/ 309
نمايش فراداده

Summary

Namespace

using s are for your convenience, not for you to inflict on others: Never write a

using declaration or a

using directive before an

#include directive.

Corollary: In header files, don't write namespace-level

using directives or

using declarations; instead, explicitly namespace-qualify all names. (The second rule follows from the first, because headers can never know what other header

#include s might appear after them.)