title: C++ : class classname :: reference { ... }
body: <p>I was learning stl and never saw this kind of class like <code>class classname :: reference {}</code></p>
  
  <p>I searched on the net but could get good information .. </p>
  
  <pre><code>class bitset::reference {
    friend class bitset;
    reference();                                 // no public constructor
  public:
    ~reference();
    operator bool () const;                      // convert to bool
    reference&amp; operator= ( bool x );             // assign from bool
    reference&amp; operator= ( const reference&amp; x ); // assign from bit
    reference&amp; flip();                           // flip bit value
    bool operator~() const;                      // return inverse value
  };
  </code></pre>
  
  <ul>
  <li>what is this :: reference here for ?</li>
  </ul>
  
  <p>i saw this code here[enter link description here][1]
  <a href="http://www.cplusplus.com/reference/stl/bitset/" rel="nofollow">http://www.cplusplus.com/reference/stl/bitset/</a>
  i have worked on c++ before.</p>