
On Mon, Jan 17, 2011 at 10:15 AM, Dean Michael Berris < mikhailberis@gmail.com> wrote:
On Mon, Jan 17, 2011 at 11:06 PM, Beman Dawes <bdawes@acm.org> wrote:
namespace boost { namespace assertion { namespace detail { inline void extended_assert_failed(char const * msg, char const * function, char const * file, long line) { std::cerr << "***** Internal Program Error - Assertion Failed
*****\n";
std::cerr << file << '(' << line << "): error in " << function << ": " << msg << std::endl; std::exit(99999); } }}} // boost::assertion::detail
This caught my eye. Do you really want to hard-code the exit value to 99999?
No, and particularly not since 99999 would overflow if int is 16 bits. But... Or would you rather use std::abort() just like the normal
cassert implementation does?
On Windows 7 (at least with VC++), abort() pops up one of those "blah.exe has stopped working" dialog boxes. I haven't been able to kill it, in spite of lots of google searches, and it drives me crazy. That said, std::abort() is probably right for many environments. --Beman