[c++] Resolving namespace conflicts
- by Kyle
I've got a namespace with a ton of symbols I use, but I want to overwrite one of them:
external_library.h
namespace lottaStuff
{
class LotsOfClasses {};
class OneMoreClass {};
};
my_file.h
using namespace lottaStuff;
namespace myCustomizations
{
class OneMoreClass {};
};
my_file.cpp
using myCustomizations::OneMoreClass;
int main()
{
OneMoreClass foo; // error: reference to 'OneMoreClass' is ambiguous
return 0;
}
How do I get resolve the 'ambiguous' error without resorting to replacing 'using namespace lottaStuff' with a thousand individual "using xxx;" statements?