Why you didn't try it yourself? It's a trivial problem which you can solve like in 3 minutes. Posting there took you more time!
As for your question: yes, you can.
If he tries this how do he know if this behaviour is standard or just specific to that compiler? C++ is not a try-and-see language. You need to know what you are doing.
Last edited on
I use GCC. does it need additional linker option?
Can I nest namespaces like this?
No need for additional linker options, or anything. This is standard C++ and will work.