Multiple aliases for a namespace?
C++C++ Problem Overview
Is it possible to have a namespace that has all the declarations of more than one other namespace? Like this:
namespace std {...};
namespace glm {...};
namespace mynamespace = std; //mynamespace is an alias for std
namespace mynamespace += glm; //mynamespace will hold glm functions as well.
C++ Solutions
Solution 1 - C++
Sure
namespace mynamespace
{
using namespace std;
using namespace glm;
}
Solution 2 - C++
You can use using
to achieve this:
namespace mynamespace {
using namespace std;
using namespace glm;
}