
26 May
2011
26 May
'11
10:53 p.m.
Am 26.05.2011 23:30, schrieb Krzysztof Czainski:
Looks like auto_ptr really isn't suitable for pimpl. And auto_ptr has many more draw-backs, so it is deprecated.
But getting back to the mini-review, suppose we use scoped_ptr instead of auto_ptr. I think Artyoms arguments still stand. And then you can't forget to make a non-inline destructor, because scoped_ptr uses checked_delete.
I certainly prefer using a specialized and well-tested library requiring just a couple of lines over manually implementing such an essential idiom by introducing boilerplate-code. Not mentioning the case when value semantics are wanted which scoped_ptr doesn't support.