Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2007-08-30 22:50:23


"Frank Birbacher" <bloodymir.crap_at_[hidden]> wrote in message
news:fb7kpn$or8$1_at_sea.gmane.org...
> Hi!
>
> Gennadiy Rozental schrieb:
>> What's wrong with solutions I proposed?
>>
>> You can always do this in your code:
>>
>> #define CHECK_NOT_EQ( a, b ) BOOST_CHECK_PREDICATE( _1 != _2, (a)(b))
>
> Yes, you can always do this. But libraries are to make things convenient.
>
> For my part I don't see any point in the new macro. I propse the use of
> BOOST_CHECK/BOOST_CHECK_MESSAGE:
>
> BOOST_CHECK( a != b );
>
> The standard "assert" doesn't provide more either. And there would be an
> exponential number of combinations of warning level, optional message,
> and various kinds of operators. Unless these can be automatically
> generated I would resort to simple things as the above.

Actually my solution is preferable, since you will be able to see matched
values (though on the other hand failed x != 5 condition doesn't need
additional clarifications, but this is not the case for other checks we are
discussing)

Gennadiy


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