Hello List,
Just a quick question, why can you not compare between different sized
dynamic bitsets?
As I am trying to add some operators to it in my application so that it
can become a large interger type.... (ie in excess of 256 bits)
boost::dynamic_bitset<>
operator++(
boost::dynamic_bitset<>& x,
int
) {
bool c = true;
for(boost::dynamic_bitset<>::size_type i = 0; c && (i <
x.size()); i++) {
if(x[i]) {
c = true;
}else{
c = false;
}
x[i].flip();
}
if(c) {
x.resize(x.size()+1,true);
}
return x;
};
If I have a for loop and the post incremental operation increases the
size of the bitset then operator < bails with an assertion failure :
/usr/include/boost/dynamic_bitset/dynamic_bitset.hpp:1288: bool
boost::operator<(const boost::dynamic_bitset