title: Unnamed/anonymous namespaces vs. static functions
body: <p>A feature of C++ is the ability to create unnamed (anonymous) namespaces, like so:</p>
  
  <pre><code>namespace {
      int cannotAccessOutsideThisFile() { ... }
  } // namespace
  </code></pre>
  
  <p>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 namespaces <em>are</em> accessible within the file they're created in, as if you had an implicit using-clause to them.</p>
  
  <p>My question is, why or when would this be preferable to using static functions? Or are they essentially two ways of doing the exact same thing?</p>