Boost logo

Boost :

From: Vladimir.Batov_at_[hidden]
Date: 2007-11-01 15:53:49


> > Achieving non-copyability seems as straightforward as
> >
> > struct Foo : public pimpl<Foo>::pointer_semantics, boost::noncopyable
> > {
> > };
> >
>
> Does this not use shared_ptr under the hood still?
> Isn't that a bit inefficient?

1. IMHO shared_ptr overhead is very much overrated.
2. If you use it in a noncopyable fashion, then there is no run-time
overhead. If you meant memory overhead, then I do not think it is
something to worry about.
3. Untimately, you could try struct Foo : public
pimpl<Foo>::value_semantics, boost::noncopyable.

Thanks,
Vladimir.


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