Boost logo

Boost :

From: James Porter (porterj_at_[hidden])
Date: 2008-05-21 12:08:26


On Wed, May 21, 2008 at 1:57 AM, Corrado Zoccolo <czoccolo_at_[hidden]> wrote:
> I don't think you can get rid of the overloads.
> The overloads are needed to implement the truth tables (see
> http://www.boost.org/doc/libs/1_35_0/doc/html/boost/logic/operator_id257657.htmland
> http://www.boost.org/doc/libs/1_35_0/doc/html/boost/logic/operator!_id340819.html
> ).

Wouldn't it make more sense to use operator| instead of operator|| ?
When used in the context of boolean algebra, the former always carries
with it the expectation that there will be no short-circuiting. The
lack of short-circuiting makes overloading operator|| a headache for
users (though I can't imagine how you'd implement it to allow
short-circuiting).

The same (obviously) applies to operator&& as well. :)

- Jim


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