I have a header file in which I wish to use a namespace alias while defining a class. However I don’t want to expose this alias to anything that includes the header file.
// foo.h
namespace qux = boost::std::bar::baz::qux; // ! exposed to the world
class foo
{
// can't put a namespace alias here
// stuff using qux::
};
How can I alias a namespace for a class declaration without it leaking out everywhere?
This is also how most Boost libraries do it, put all their stuff in a seperate namespace and lift the important identifiers into the
boostnamespace.