title: convert vector of uint8_t to bitset
body: <p>In the following code I've a <code>uint8_t</code> vector filled from some binary file which contains information in <code>some_size</code> number of bytes - </p>
  
  <pre><code>std::ifstream db(path.c_str(), std::ios::binary);
  std::vector &lt;uint8_t&gt; buffer(some_size, 0);
  db.read(reinterpret_cast&lt;char *&gt;(&amp;buffer.front()), some_size);
  db.close();
  </code></pre>
  
  <p>Now I know from some index say 20, there exists 37 bytes of either <code>1</code> or <code>0</code> which I need to fill into a <code>bitset</code>. The bitset looks like <code>std::bitset&lt;37&gt; booleans;</code> and is initialized to all <code>0</code>s initially. Now if initial index is 20, so I need to fill <code>booleans</code> with 37 boolean values that are present in bytes which will range from <code>buffer[20]</code> to <code>buffer[56]</code>.</p>
  
  <p>Apart from looping over the vector and manually setting 1 or 0 on each bit in bitset, is there any other way to convert those bytes to this bitset?</p>