static keyword useless in namespace scope?

后端 未结 6 1883
隐瞒了意图╮
隐瞒了意图╮ 2021-01-01 12:30
namespace N
{
   static int x = 5;
}

What could be the importance/use-cases of declaring having a static variable at namespace scope?

6条回答
  •  一向
    一向 (楼主)
    2021-01-01 12:46

    Same as that of declaring a static in a global namespace but just local to a particular namespace.

提交回复
热议问题