Access multiple bits in bitset
<p>I am writing up a cache simulator, in which 32 bits address is used. I use bitset&lt;32> to store the address. A problem comes across when I try to access multiple bits of address to decode. For example:</p>

<pre><code>int index = address[index_MSB, index_LSB].to_ulong();
</code></pre>

<p>I try to access some bits in address and converting to int. It causes errors. 
Is there any way to do this? Thanks!</p>

<p>example:</p>

<p>address = 0x12345678;</p>

<p>index_MSB = 5;</p>

<p>index_LSB = 2;</p>

<p>I would need 4 bits from address[2] to address[5], here is 1110, and convert to int value: 14. </p>
