Boost logo

Boost :

Subject: Re: [boost] [pimpl] Mini Review
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2011-05-26 08:20:24


> From: Thomas Klimpel <Thomas.Klimpel_at_[hidden]>

>
> Did I totally misunderstood you here, or was this
> comparison intended as a ironic remark, or is my
> understanding old "old std::auto_ptr" incorrect, or ...?

It was indeed half ironic and half not.

For non-copyable classes std::auto_ptr IS better then
Boost.Pimpl as Boost.Pimpl does not even provide support
of non-copyable implementations. So if the
class in non-copyable std::auto_ptr is INDEED better,
because in such case auto_ptr == scoped_ptr

However it is also irony as IMHO it is easier to workaround
auto_ptr copy/assign issue manually then use Boost.Pimpl
that requires that my class would be derived from some other
fancy (and almost useless class) writing a verbose code.

Artyom Beilis
--------------
CppCMS - C++ Web Framework: http://cppcms.sf.net/
CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/

P.S.: Shame that auto_ptr was deprecated...


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