|
Boost Users : |
From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2005-04-29 14:56:25
> Date: Fri, 29 Apr 2005 10:56:14 +0200
> From: David Gruener <gruenedd_at_[hidden]>
> Subject: Re: [Boost-users] Re: pimpl and boost
> To: boost-users_at_[hidden]
> Message-ID: <4271F6AE.20509_at_[hidden]>
> Content-Type: text/plain; charset=us-ascii; format=flowed
>
> Pavel Antokolsky aka Zigmar wrote:
> > auto_ptr - compiled with warning about destroying incomplete type
>
> As i already mentioned,
> very little to no benefit here over plain pointer.
>
> > shared_ptr - compiled and worked - the destructor of
>
> Yes, but you still have to provide assignment and copy
> constructor for your standard cases. So, as i stated, little
> benefit here over plain pointer too and an ideological problem that
> shared_ptr used in this way, as serveral times suggested,
> isn't a shared pointer anymore.
> Again, whats needed is a pointer like Griffiths's grin_ptr
> or Peter's impl_ptr. I'm looking forward to the
> policy pointers.
>
> --David
>
I agree, if/when the need next arises, I will find/write an impl_ptr<>.
I will also go with the technique mentioned earlier of ONLY putting
the data in the impl_ptr, and not forwarding all the functions.
(Still think it should be part of the language though. C++ proclaims
to enable data-hiding, but it really doesn't. The speed/data-hiding
trade-off that C++ originally made was fine for the times, but now
that trade-off isn't so necessary...)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net