
As does assert( statement || !"Statement failed" ) which is 'faster' when statement == true Mike ----- Original Message ----- From: "Andrew Holden" <aholden@charteroaksystems.com> To: <boost-users@lists.boost.org> Sent: Monday, December 18, 2006 2:18 PM Subject: Re: [Boost-users] BOOST_ASSERT and others
Sebastian Redl wrote:
Maarten Nieber wrote:
Sorry, I should have checked! It should be:
assert( 2 + 2 == 4 && "Adding numbers failed!" )
That still won't fire. The concept is flawed. You cannot use assert()s to print debug messages, because when an assert() prints a message, it also stops the program.
Actually, it will. The versions of assert that I have seen will print the complete expression that failed before they stop the program. This will include the string. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users