Is it good practice to use multiple namespace in same C++ source file?

Viewed 22833

I want to include more than one namespace in the same .cpp file.

While std is widely used, the namespace z3 will be used in about 10% of a 25 KLOC file.

Will it be a good practice to use both as

    using namespace std;
    using namespace z3;

I am thinking of using only std and then use the Z3 methods by mentioning the namespase whenever required. Like,

    using namespace std;

    z3::context c;
    z3::solver s;

Which of these is better practice?

I do not want to rename them into one namespace.

Thanks and regards, Sukanya

2 Answers
Related