Possible to wrap or merge separate namespaces?

前端 未结 3 648
遇见更好的自我
遇见更好的自我 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-18 10:36

    You can do this:

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

    But if a and b have elements with the same names, you won't be able to use them from namespace c.

提交回复
热议问题