Boost logo

Boost :

From: Jon Kalb (jonk_at_[hidden])
Date: 2000-12-15 11:19:37


IMHO, assertions should assert(), not throw.

Also, wouldn't you want: if (!(expr)) \ ?

At 11:12 AM -0500 12/15/00, Jeremy Siek wrote:
>Should we have a boost macro for adding in this kind of assertion?
>
>#define BOOST_ASSERT_RANGE(expr) \
> if (expr) \
> throw std::range_error( \
> __FILE__ + std::string(":") \
> + boost::lexical_cast<std::string>(__LINE__) + \
> std::string(": range error") )

-- 
jonk

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