title: Why are unnamed namespaces used and what are their benefits?
body: <p>I just joined a new C++ software project and I'm trying to understand the design.  The project makes frequent use of unnamed namespaces.  For example, something like this may occur in a class definition file:</p>
  
  <pre><code>// newusertype.cc
  namespace {
    const int SIZE_OF_ARRAY_X;
    const int SIZE_OF_ARRAY_Y;
    bool getState(userType*,otherUserType*);
  }
  
  newusertype::newusertype(...) {...
  </code></pre>
  
  <p>What are the design considerations that might cause one to use an unnamed namespace?  What are the advantages and disadvantages?</p>