See subject. What were they thinking?
UPDATE: Changed from “static” to “internal linkage” to save confusion.
To give an example… Putting the following in a file:
const int var_a = 1;
int var_b = 1;
…and compiling with g++ -c test.cpp only exports var_b.
I believe you mean
It’s true that if you declare a const object at namespace scope, then it has internal linkage.
Appendix C (C++11, C.1.2) gives the rationale