Is there a better way to express nested namespaces in C++ within the header
To avoid really deep indenting, I usually do it this way:
namespace A { namespace B { namespace C
{
class X
{
// ...
};
}}}
C++17 might simplify nested namespace definition:
namespace A::B::C {
}
is equivalent to
namespace A { namespace B { namespace C {
} } }
See (8) on namespace page on cppreference:
http://en.cppreference.com/w/cpp/language/namespace