title: Custom implementation of a bool vector with bit representation - how to implement operator[]
body: <p><em>Disclaimer - this is a school assignment, however the problem is still interesting I hope!</em></p>
  
  <p>I have implemented a custom class called <code>Vector&lt;bool&gt;</code>, which stores the <code>bool</code> entries as bits in an array of numbers.</p>
  
  <p>Everything has gone fine except for implementing this:</p>
  
  <pre><code>bool&amp; operator[](std::size_t index) {
      validate_bounds(index);
      ???
  }
  </code></pre>
  
  <p>The <code>const</code> implementation is quite straight forward, just reading out the value. Here however I can't really understand what to do, and the course is a specialization course on C++ so I'm guessing I should do some type-deffing or something. The data is represented by an array of type <code>unsigned int</code> and should be dynamic (e.g. <code>push_back(bool value)</code> should be implemented).</p>