title: std::bitset::all substitute for prior C++11 compilers
body: <p>I would like to use the <code>std::bitset::all</code> but unfortunately my compiler is pre-dated C++11. I know that I could mimicate the functionality by checking in a loop whether all bits of my <code>std::bitset</code> are set.</p>
  
  <p>e.g.,</p>
  
  <pre><code>template&lt;std::size_t N&gt;
  bool
  all(std::bitset&lt;N&gt; const &amp;bs) {
    int hits(0), sz(bs.size());
    for(int i(0); i &lt; sz; ++i) {
      hits += bs[i];
    }
    return hits == sz;
  }
  </code></pre>
  
  <h2>Q:</h2>
  
  <p>Is there a more proper implementation of a <code>std::bitset::all</code> substitute for pre-dated C++11 compilers than the one displayed above.</p>