
1 Nov
2007
1 Nov
'07
7:53 p.m.
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.