|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 2002-01-29 07:56:30
>As a transitional measure, <boost/smart_ptr.hpp> still gives the old
>version. Since the old and new version use the same name, you can't mix
old
>with new. Note that this means you can't mix the new smart pointers with
the
>Boost.Python or Boost.Regex library until this is changed. We'll have to
>resolve this one way or another before the next release.
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?
>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).
>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.
- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk