is there a simplified way to include more namespaces instead of typing every time the same things. This is very annoying, especially in the .h files.
For instance:
Instead of writing:
int f() {
using namespace blabla1;
using namespace blabla2;
using namespace blabla3;
}
I would prefer:
using myNamespace = blabla1, blabla2, blabla3;
int f() {
using namespace myNamespace;
/// this will be equivalent to the previous example
}
Thanks
Using directives are transitive. So if you aggregate them into a single namespace
You can then simply do
And unqualified name lookup will work.
Live example