BOOST_DEBUG like macros: current state overview

Some time ago I suggested to add support for BOOST_DEBUG and BOOST_NDEBUG macros into guidelines. I searched how individual libraries (1.31) handle debug support: ------------------------------------- * lexical_cast - uses assert() * dynamic_bitset - uses assert() * filesystem - uses assert() * graph - uses assert() * interval - uses assert() * thread - uses assert() * tokenizer - uses assert() * random - uses assert() * lambda - uses assert() * multi_array - uses assert() * signals - uses assert() * format - uses BOOST_ASSERT() * function - uses BOOST_ASSERT() * variant - uses BOOST_ASSERT * optional - uses BOOST_ASSERT * smart_ptr - uses BOOST_ASSERT and macro with somewhat misleading name BOOST_SP_ENABLE_DEBUG_HOOKS * concept_check - uses NDEBUG directly * ublas - uses its own macro BOOST_UBLAS_CHECK depending on NDEBUG. Documented * python - uses its own macro BOOST_PYTHON_INDEXING_CHECK_INVARIANT depending on NDEBUG and also NDEBUG directly. Not documented * regex - uses assert() based on BOOST_REGEX_DEBUG and jm_assert (macro too). Uses also BOOST_REGEX_DEBUG directly. No dependence on NDEBUG. Not documented. * spirit - uses macro BOOST_SPIRIT_ASSERT depending on assert() as well as handful of other library specific debug macros. Well documented. Circular Buffer, Multi Index Container and likely Serialization contain (documented) extensive support for debug mode with their specifi macros and different level modes. ------------------------------------- Documentation usually doesn't mention if/how debug support is implemented. Maybe common macros would make life of Boost user easier. /Pavel

On Sat, 12 Jun 2004 20:47:04 +0200, "Pavel Vozenilek" <pavel_vozenilek@hotmail.com> wrote:
Documentation usually doesn't mention if/how debug support is implemented.
That's an usual thing, outside boost too.
Maybe common macros would make life of Boost user easier.
I don't know. Certainly I would vote "no", though, if the common debug facilities went beyond the level of a 15-20 lines of simple and *portable* code. We can't afford anything that doesn't work perfectly on all the supported compilers. -- Genny.

Gennaro Prota wrote:
Maybe common macros would make life of Boost user easier.
I don't know. Certainly I would vote "no", though, if the common debug facilities went beyond the level of a 15-20 lines of simple and *portable* code. We can't afford anything that doesn't work perfectly on all the supported compilers.
I should have included link to previous message: (http://aspn.activestate.com/ASPN/Mail/Message/boost/2085600) I do not suggest new set of ASSERT-like macros. My suggestion was: - if NDEBUG is defined debug support is switched off, otherwise - if BOOST_NDEBUG is defined debug support is switched off, otherwise - if BOOST_DEBUG is defined all libraries will enable it, otherwise - library defaults will apply /Pavel
participants (2)
-
Gennaro Prota
-
Pavel Vozenilek