Bitset Intialization C++

70 Views Asked by At

I know this initialization: bitset<20>.

But what does this initialization mean: bitset<1<<20>?

1

There are 1 best solutions below

7
Quimby On

But what this initialization means?

Parsing headache for the compiler perhaps.

You can use equivalent snippets: bitset< 1<<20 > - i.e. 1 left-shifted by 20 bits - bitset<1048576>