Why is this an issue?
Since C++11, declaring a variable, class, or function in an unnamed
namespace gives it internal linkage. Similarly, marking a
static also gives it internal linkage. Because both mechanisms have the same effect (although
static has a
narrower application) using them together is clearly redundant.
Noncompliant code example
static int i = 3; // Noncompliant
int i = 3;
- ISO/IEC 14882:2011 §3.5 paragraph 4