namespace N
{
static int x = 5;
}
What could be the importance/use-cases of declaring having a static variable at namespace scope?
C++ Standard §7.3.1.1/2:
The use of the static keyword is deprecated when declaring objects in a namespace scope (see annex D); the unnamed-namespace provides a superior alternative.
Unless the unnamed namespace provides a superior alternative in the future Standard it will be undeprecated to achieve C compatibility.