|
Boost : |
From: Lars Gullik Bjønnes (larsbj_at_[hidden])
Date: 2007-11-25 12:53:22
Stefan Seefeld <seefeld_at_[hidden]> writes:
| Lars Gullik Bjønnes wrote:
>
>> Which brings be to a nother point: It is _very_ bad of a library to
>> require of the application to define NDEBUG to work properly.
>> (The application should be able to decide for itself how NDEBUG/assert
>> should be used.)
>> Ublas should stop using NDEBUG and create their own BOOST_UBLAS_DEBUG
>> or similar and use that instead.
>
| Are you saying library code may not use the standard 'assert' macro,
| then, at least not in headers ?
>
| I don't quite agree with your statement. In fact, whenever you are using
| libraries that are mostly implemented in headers, it becomes very hard
| to encapsulate behavior the way you seem to request.
Still, forcing the application to not be able to use standard assert
as it'd like is not really acceptable.
And if I am not mistaken something similar to my imagined
BOOST_UBLAS_DEBUG is used for almost all other boost libraries.
(At the very least the do not use NDEBUG as a switch for anything)
(I see that other libs also use NDEBUG/ASSERT, and think that too is
bad. But for ublas the implications are a lot worse. 3 magnitudes of
performace is not to shrug at.)
-- Lgb
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk