Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-05-27 08:08:39

"Pavel Vozenilek" <pavel_vozenilek_at_[hidden]> writes:

> 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.

What about static asserts (which cost compile-time resources)?

> - 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.

That seems like a small price to pay if there are significant
benefits... but are there? What's the motivating case for doing this?

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at