Possible to wrap or merge separate namespaces?

前端 未结 3 686
遇见更好的自我
遇见更好的自我 2021-01-18 09:55

I seem to recall seeing notes somewhere on a way to combine multiple namespaces into one.

Now, looking for said notes I am not finding them -- even searching using s

3条回答
  •  孤城傲影
    2021-01-18 10:30

    You can wrap the namespaces in a new one like this:

    namespace c {
        namespace a { using namespace ::a; }
        namespace b { using namespace ::b; }
    }
    

提交回复
热议问题