You are polluting your own detail namesapce, but not Lib or global namespaces. Therefore, assuming the responsible adult is using your library, they will not have unintended name conflicts:
#include <vector> namespace Lib { namespace detail { using namespace std; } } using namespace Lib; int main() { vector<int> v; // This is an error, vector not declared in this scope }
source share