Re: [boost] Proposed Boost Assert -- once again
by Peter Dimov other posts by this author
Nov 14 2002 6:48PM messages near this date
[boost] Re: Proposed Boost Assert -- once again
|
Re: [boost] Proposed Boost Assert -- once again
From: "Rob Stewart" <stewart@[...].com>
> From: "Peter Dimov" <pdimov@[...].net>
> >
> > #elif defined(BOOST_ENABLE_ASSERT_HANDLER)
> >
> > #include <boost/current_function.hpp>
>
> I don't follow what this is about. The "handler," as I
> understand it, is assertion_failed() declared below, so why this
> header?
boost/current_function.hpp defines the BOOST_CURRENT_FUNCTION macro.
> > - there is no BOOST_ASSERT_MSG. I don't have a strong opinion here. As
the
> > main purpose of BOOST_ASSERT is to replace the standard assert, and
since
> > the file/line/function supply enough information, I haven't provided a
> > BOOST_ASSERT_MSG macro, but I'm not strongly opposed to having one,
either.
>
> We find it invaluable to provide explanatory text along with the
> expression that failed. We often build strings -- at runtime --
> that provide additional context information and description in
> the message.
Interesting perspective. The question that springs to mind is: would you
abandon your ASSERT macro in favor of BOOST_ASSERT_MSG, if it existed? Why
would you want to do that? IOW, what is the intended audience of
BOOST_ASSERT, Boost library developers or "end users"?
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Kevin S. Van Horn
Peter Dimov
Bertolt Mildner
Peter Dimov
Fernando Cacciola
Peter Dimov
Rob Stewart
Fernando Cacciola
Fernando Cacciola
David Abrahams
Peter Dimov
Vladimir Prus
Peter Dimov
Eric Woodruff
|