Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2002-05-02 14:34:29


----- Original Message -----
From: "Andrei Alexandrescu" <andrewalex_at_[hidden]>
Newsgroups: gmane.comp.lib.boost.devel
To: <boost_at_[hidden]>
Sent: Thursday, May 02, 2002 2:19 PM
Subject: [boost] Re: Problem solved: EBO pessimization in smart_ptr not
an issue anymore!

> "David Abrahams" <david.abrahams_at_[hidden]> wrote in message
> news:133a01c1f1c7$00b96320$6401a8c0_at_boostconsulting.com...
> > 2. It does mean that the constructors/destructors of empty policies
get
> > skipped (compressed_pair doesn't have that issue, but has others)
>
> Good point. I was thinking of issuing some surrogate calls to them.
>
> Another thing worth noting is that the constructors are not even
checked in
> the empty policy case.
>
> > 3. Is using public inheritance at all really important? My
impression is
> > that you do this to allow the policies to add interface to the
> > smart_ptr... while at the same time you eschew public member
functions.
>
> Hey, I think it would be a great idea to use private inheritance. That
way,
> policies can enhance interface only through free functions, which is
my
> intent anyway. What do others think?

To put it another way, is it important to use inheritance at all?
Are you using the Barton/Nackman trick?
If so, I am in principle in favor of private inheritance.

-Dave


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