T018

Using namespace is not allowed in header files

Description:

Using namespace directives are not allowed in header files.

The using namespace directive imports names from the given namespace and when used in a header file influences the global namespace of all the files that directly or indirectly include this header file.

It is imaginable to use the using namespace directive in a limited scope in a header file (for example in a template or inline function definition), but for the sake of consistency this is also discouraged.

Compliance: C++ Coding Standards

Rule index