Boost logo

Boost :

From: Gennaro Prota (gennaro_prota_at_[hidden])
Date: 2004-04-17 04:23:57


On Thu, 15 Apr 2004 14:21:12 -0500, Jeremy Siek <jsiek_at_[hidden]>
wrote:

>Hi Gennaro,
>
>On Apr 14, 2004, at 4:06 AM, Gennaro Prota wrote:
>> I was thinking, however: what about returning the index of the first
>> bit in common (or npos), instead of true/false?
>
>That functionality sounds useful,

Besides usefulness, the idea was to not "throw away" information that
the function already has (well, almost: it knows the two blocks which
have a non-null bitwise and; then it's just a matter of calling my
lowest_bit function).

Of course one could want a mechanism to get, then, the second bit in
common, then the third, etc... If anyone has ideas... :)

> but I think the current intersects()
>function should not be removed since it provides for a common use case.
>Adding another function with the semantics you describe would be good.

I see. But my worry is that we'll have a much dirtier interface if we
add utility functions (shortcuts to other functions) light-heartedly.
Since dynamic_bitset has already a lot of functions I think we should
have a fairly minimalist policy.

Genny.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk