Boost logo

Boost :

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


On Wed, 14 Apr 2004 09:12:35 -0400, David Abrahams
<dave_at_[hidden]> wrote:

>> On Wed, 14 Apr 2004 09:34:14 +0200, Gennaro Prota
>> <gennaro_prota_at_[hidden]> wrote:
>> I was thinking, however: what about returning the index of the first
>> bit in common (or npos), instead of true/false?
>
>Ugh, not bit indices, at least not with *that* name!

Yes, not with that name :)

>
> if (intersects(a,b)) // oops
> {
>
> }
>
>Maybe optional<std::size_t>?

I would rather prefer a Barton-Nackman Fallible<size_type>. I don't
know if it has a place into boost, though (what about its license? is
it compatible with the boost one?). Of course find_first/next, and
eventually their variations, would return a Fallible<> too.

Genny.


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