From: DEAN STURTEVANT (dean_at_[hidden])
Date: 2000-12-15 11:22:00
--- In boost_at_[hidden], Jeremy Siek <jsiek_at_l...> 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") )
Well, ignoring the fact that the test should be on !(expr) rather
than expr and that the construction is syntactically incorrect (You
can't go "string" + std::string("str")), I was thinking of something
more lightweight. What is wrong with assert()?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk