title: Overloading operator<< for a nested private class possible?
body: <p>How one can overload an operator&lt;&lt; for a nested private class like this one?</p>
  
  <pre><code>class outer {
    private:
      class nested {
         friend ostream&amp; operator&lt;&lt;(ostream&amp; os, const nested&amp; a);
      };
    // ...
  };
  </code></pre>
  
  <p>When trying outside of outer class compiler complains about privacy:</p>
  
  <pre><code>error: ‘class outer::nested’ is private
  </code></pre>