RE: [boost] [guidelines suggestion] boost-wide debug support

Hi, it think, it is good to be able to turn on debugging for the one library only, at least sometimes, and to to have the debugging output from all. I would not get rid of local debugging macros completely - thy could be defined according to the global presence of BOOST_DEBUG, e.g. Then, one can easily control the full debug output with BOOST_DEBUG or refine the configuration with a separate BOOST_XXX_DEBUG. Do you see it sensible? Ferda
From: Pavel Vozenilek [mailto:pavel_vozenilek@hotmail.com]
Right now every library enabled and disables internal debug support individually. Its impossible to do it now from single place.
Suggestion for guidelines:
- If BOOST_NDEBUG is defined then all libraries will switch off any debug support (asserts, pre- and post-condition checking, invariants etc). There would be no exception.
- If BOOST_DEBUG is defined then all available debug suport will be switched on. There would be no exceptions.
- If neither of macros is defined then libraries will behave as they behave now - picking their own choice using library specific macros. This would allow fine grained customization.
Enforcing this rule would require quite a lot of effort and cooperation though. For example all assert()s would need to convert to BOOST_ASSERT()s.
/Pavel

"Ferdinand Prantl" <ferdinand.prantl@ixos.de> wrote:
it think, it is good to be able to turn on debugging for the one library only, at least sometimes, and to to have the debugging output from all.
I would not get rid of local debugging macros completely - thy could be defined according to the global presence of BOOST_DEBUG, e.g. Then, one can easily control the full debug output with BOOST_DEBUG or refine the configuration with a separate BOOST_XXX_DEBUG.
Do you see it sensible?
Current situation is that library uses its own debugging system/macros/settings (with no common naming conventions or common structure). This should stay - it is useful under circumstances and radical change may cause troubles. BOOST_DEBUG and BOOST_NDEBUG are IMHO maximum what can be asked and actually accomplished. Finer grained BOOST_XXX_DEBUG macros may be too much and may end being ignored in practice. (I would like to have them.) /Pavel
participants (2)
-
Ferdinand Prantl
-
Pavel Vozenilek