Boost logo

Boost :

From: Darin Adler (darin_at_[hidden])
Date: 2002-01-29 11:25:41


On 1/29/02 4:56 AM, "John Maddock" <John_Maddock_at_[hidden]> wrote:

> That's a pretty horrid way to go - it means that if I modify regex to use
> the new headers, then existing user code that also uses
> <boost/smart_ptr.hpp> will fail to compile. If I don't modify regex, then
> new code that uses the new headers won't work with regex. And then there
> is the possibility of different translation units doing different things,
> with all the ODR violation problems that brings. Can't we modify
> <boost/smart_ptr.hpp> so that it just includes the new headers?

I agree. I argued for this, but was unable to convince Peter.

>> The asserts in the new smart pointer class templates use a new
>> <boost/assert.hpp> BOOST_ASSERT macro, which defaults off. Other asserts
>> in Boost use the standard C <assert.h> assert macro, which defaults on.
>> Still other places in Boost use the word "assert" to refer to code that
>> throws exceptions. More refinement in this area is probably needed, including
>> perhaps formal review of <boost/assert.hpp>.
>
> I think a basic assert should be on by default (at least when NDEBUG is not
> defined).

Ditto. I still prefer my proposed <boost/assert.hpp>. Basically, this:

    #ifdef BOOST_ASSERT_HEADER
    #include BOOST_ASSERT_HEADER
    #endif

    #ifndef BOOST_ASSERT
    #define BOOST_ASSERT(predicate) assert(predicate)
    #endif

Maybe we should open up this for debate or soemthing.

>> The documentation and test programs have not yet been updated for the new
>> smart_ptr. We probably need to deal with this before the next release.
>
> We shouldn't release undocumented "top-level" headers IMO.

Yes. If we can't get documentation done in time for the release, maybe we'll
have to roll these out again?

    -- Darin


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