Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 1999-12-30 15:18:26


At 05:10 PM 12/26/99 -0500, Dave Abrahams wrote:

>The lines to which you refer are:
>
> #if !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS )
> private:
>
>It seems to me that it ought to be changed to
>
> #if defined(BOOST_NO_MEMBER_TEMPLATES) \
> || !defined( BOOST_NO_MEMBER_TEMPLATE_FRIENDS )
> private:

I don't see that. The point of making the privates public was to
allow member templates to work even when member template friends
didn't. So what is the point if there are no member templates at
all? Or am I missing something?

>[While we're at it, I think we ought to move the #define for
>BOOST_NO_MEMBER_TEMPLATES from smart_ptr.hpp into config.hpp --
comments?]

Agreed. Done.

> Because scoped_ptr is so simple, in its usual implementation
every
> operation is as fast as a built-in pointer and has no more space
> overhead that a built-in pointer.
>
>shared_ptr doesn't have this property. You might use scoped_ptr to
implement
>a handle/body structure which avoids exposing the body
(implementation) in
>the header file:
>
>class handle
>{
>public: // simple forwarding functions to the body class
> void f();
> void g(int);
>private:
> boost::scoped_ptr<body> m_p;
>};

Happy Y2K,

--Beman


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