   [C++] Arithmetic operations with boost::dynamic_bitset
  hiIs it possible to do an arithmetic operation on 2 boost::dynamic_bitsets ??say I want to do something like this : boost::dynamic_bitset<> a(3,3);boost::dynamic_bitset<> b(3,3);boost::dynamic_bitset<> c(3,0);c = a+b; //I would want c to have a value of 6 (110)there is no support for the arithmetic operators but say I do want this, can anybody point me into the right direction?cheers   
  I don't have much experience with dynamic_bitset, but from just glancing through the interface you should be able to do:dynamic_bitset<> c(max(a.size(),b.size())+1, a.to_ulong() b.to_ulong());Where the +1 is to handle potential overflow.  Note that this isn't particular efficient if a and b have a lot of 0 padding on the most significant end, so if that's an issue you'll need a more clever approach (probably doing the bitwise addition yourself).   