From: Douglas Paul Gregor (gregod_at_[hidden])
Date: 2002-08-14 10:36:15
On Wed, 14 Aug 2002, William E. Kempf wrote:
> > > * !!(predicate) fix as discussed
> > No longer necessary. I switched to BOOST_TEST(p? true: false); adding !!
> > BOOST_TEST would silently test operator!, not the "boolean context"
> > conversion.
> I'd say it would still be necessary since other people are sure to use the
> same construct. However, you bring up a good point about it causing the
> wrong thing to be tested, so !! is the wrong solution. Probably need to
> apply the ternary operator instead.
Maybe we can introduce another macro here, such as
BOOST_TEST_BOOLEAN_CONTEXT, so that what we are checking is more explicit?
I'm getting big by this same issue in Function, and x? true : false is,
IMHO, quite unclear
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk