|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2005-08-15 14:25:29
Thorsten Ottosen wrote:
> Robert R. wrote [privately]
>
>> Originally I had used scoped_ptr there. The problem is that
>> scoped_ptr isn't supported with all compilers - specifically
>> Borland. I don't know about others.
>
> If that is true then why do they pass the test???
>
> (http://engineering.meta-comm.com/boost-regression/CVS-RC_1_33_0/user/smart_
> ptr_release.html)
>
a) I don't see any tests of scoped_ptr there.
b) If I recall correctly, the borland version of scoped_ptr fails when the
type is incomplete - which makes it not useful for implementing the PIMPL
idiom.
c) I was reluctant to include the whole smart_ptr machinery for just this
one case.
I am surprised that the delete in the destructor fails to delete the pimpl.
I've been unable to find the place where a constructor throws.
> If it is true scoped_ptr don't work with borland, then I suggest that
> you at least do
>
> template< class T >
> struct serialization_scoped_ptr
> {
> // extreamely simple stuff here
> };
>
I think the borland issue would still trip this up - scoped_ptr is very
simple.
Robert Ramey
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