Boost logo

Boost :

Subject: Re: [boost] [dynamic_bitset] Comparison operators without assertions
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-05-16 23:33:22

On 17/05/2017 05:01, Edward Diener wrote:
> There is no other way to do it. BTW ulong is 64-bits on any 64-bit OS.

"unsigned long" is 32-bits on Windows, even in 64 bit.

> Feel free to suggest an algorithm which works doing bit-by-bit
> comparisons when the number of bits are different.

What's wrong with comparing bit-by-bit up to the common length, then if
still equal, whichever is longer is greater?

Sure, that doesn't necessarily produce the same answer as an integral
comparison, but that's not a useful comparison for a bitset anyway.

Boost list run by bdawes at, gregod at, cpdaniel at, john at