Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-05-28 10:39:11


Hi Dean!

----- Original Message -----
From: <deansturtevant_at_[hidden]>

> Might it be a matter of taste? I would say that if the purpose of the
> expression is to convert it to bool, then casting it to bool is the
> best way of expressing the intent.

It might be. A cast in general (especially an old-style cast) is almost
always more dangerous than !!(x), though. The reason it might be a matter of
taste in this case is that BOOST_STATIC_ASSERT does not permit runtime
behavior, so the only expressions must be integral constant expressions
anyway... so it may be a wash.

-Dave


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