
21 Sep
2005
21 Sep
'05
6:29 p.m.
Dave Harris wrote:
I did not use NDEBUG because BOOST_ASSERT doesn't, and I didn't want to revisit that decision. I imagine the policy is to use fine-grained flags and then add:
#ifdef NDEBUG #define BOOST_DISABLE_ASSERTS #endif
in a user-editable header somewhere.
The default behavior of BOOST_ASSERT is to expand to 'assert'. This means that it obeys NDEBUG, as usual. BOOST_DISABLE_ASSERTS is for situations where the user needs to disable all BOOST_ASSERTs (no assertions from within Boost are desirable) but all plain 'assert's are to be left alone.