Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-06-12 13:47:04


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk