Nested namespace in C++

P

Pallav singh

Hi All,

whats the usage of having nested namespace in c++ ?

Thanks
Pallav Singh
 
J

Juha Nieminen

Pallav singh said:
whats the usage of having nested namespace in c++ ?

The same as having inner classes and types? Organization and minimizing
global namespace pollution.
 
Q

Qi

whats the usage of having nested namespace in c++ ?

IMHO, nested namespace is not as useful as sub package in Java.
Maybe due to usually Java IDEs have good support to auto complete
for sub packages.

I personally prefer one top namespace only.

However, I think nested namespace is useful for internal
and private implementation.
A nested namespace "_internal" implicit that the user should
not use it.
Boost library uses lots of nested namespace for that purpose.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top