
----- Original Message ----- From: "Eric Niebler" <eric@boostpro.com> To: <boost@lists.boost.org> Sent: Monday, January 17, 2011 4:42 PM Subject: Re: [boost] [assert] static_assert envy
On 1/17/2011 10:24 PM, Robert Kawulak wrote:
From: Beman Dawes BOOST_EXTENDED_ASSERT(true, "This will not assert"); BOOST_EXTENDED_ASSERT(false, "This will assert");
+1, although I hate the name - it's too long. The use of asserts should be encouraged by making them fast to type and cluttering the code as little as possible. Right now I can't think of any obviously good name, but maybe BOOST_ASSERTM (assert with message)?
It should be BOOST_ASSERT_MSG, just as MPL has BOOST_MPL_ASSERT_MSG. And +1 to Dean's suggestion of std::abort. And also, can we find a better option than writing to std::cerr? And lastly, just as with BOOST_ASSERT, there should be a way to hook it to install your own failed-assertion handler. That is all. :-)
+1 Vicente