Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-03-01 16:04:53


At 09:26 AM 3/1/2002, David Abrahams wrote:

>> >BTW, most of the tests are not supposed to be run in release mode
>because
>> >assert() gets turned off. Some even forcibly error if you compile them
>> that
>> >way, so that will make your error count higher.
>>
>> Isn't that the wrong way to do things - we can forcibly turn NDEBUG off
>> with:
>>
>> #undef NDEBUG
>> #include <boost/whatever>
>>
>> And then the tests will run in release mode as well - I can well
imagine
>> running tests in release mode as well as debug mode BTW - we would want

>to
>> detect possible optimizer problems (or at least know about them)
wouldn't
>> we?
>
>Sure; what I'm describing is tradition from way back. Changing the
approach
>would require lots of small code changes -- I'm not saying we shouldn't
do
>it, though.

I think I may have started the forcible error if you compile with NDEBUG.

John's approach is probably better. But there should be a comment
explaining why it is being done - if someone just casually glanced at the
code they might think it was a mistake and remove it.

--Beman


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