Unnamed/anonymous namespaces vs. static functions
- by Head Geek
A little-used feature of C++ is the ability to create anonymous namespaces, like so:
namespace {
int cannotAccessOutsideThisFile() { ... }
} // namespace
You would think that such a feature would be useless -- since you can't specify the name of the namespace, it's impossible to access anything within it from outside. But these unnamed…