If you use namespaces for separation of modules / structurization the nesting and indentation within the the header file increases dramatically. Is there a way to write the following code in a shorter way?
namespace A
{
namespace B
{
namespace C
{
namespace D
{
namespace E
{
template <typename T>
public class X
{
public: ...
e.g. like
namespace A::B::C::D::E
{
template<typename T> ...
}
in the header file in c++?
No, that nested namespace syntax has been suggested before at different times and places but isn’t valid.
You don’t need to indent though