Alex Rivera | Logout

How to put assert into release builds in C/C++

Asked 2009-03-06T23:39:07.627
34

I need to only run ship build and I need to assert on certain condition in release build to see if the problem is fixed. How do I do it?

Edit
Report

1 Answer

2

I like to define it to throw some sort of assert_exception derived from a std::runtime_error. Then catch it somewhere and do something useful.

answered 2009-05-15T04:12:15.867

Your Answer