Multiple namespace declaration in C++

后端 未结 7 1360
无人共我
无人共我 2020-12-28 17:30

Is it legal to replace something like this:

namespace foo {
   namespace bar {
      baz();
   }
}

with something like this:



        
7条回答
  •  無奈伤痛
    2020-12-28 18:01

    For anyone wondering, the form namespace foo::bar is supported since C++17. References:

    • http://en.cppreference.com/w/cpp/language/namespace
    • http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4230.html

提交回复
热议问题