title: convert bitset to int in c++
body: <p>In c++. I initialize a bitset to -3 like:</p>
  
  <pre><code>std::bitset&lt;32&gt; mybit(-3);
  </code></pre>
  
  <p>Is there a grace way that convert <code>mybit</code> to <code>-3</code>. Beacause bitset object only have  methods like <code>to_ulong</code> and <code>to_string</code>. </p>