I have used boost::dynamic_bitset
before as boost::dynamic_bitset<>
, without really thinking about why it is templated.
Though I can understand why std::bitset
is templated (the template type is used to specify the size of the bitset), I have now encountered some code of the form boost::dynamic_bitset<unsigned char>
and I can't figure out what's the point of the template type.
How is boost::dynamic_bitset<unsigned char>
different from boost::dynamic_bitset<>
? Should one be used over the other in any situation?