$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-06-13 09:44:35
From: "Alexander Terekhov" <alexander.terekhov_at_[hidden]>
To: <pdimov_at_[hidden]>
> > > explicit scoped_ptr(std::auto_ptr<T> &p): ptr(p.release()) {}
> > >
> > > and it works as expected, taking away ownership from auto_ptr and
giving
> > > it to scoped_ptr.
> > >
> > > Is this something my compiler (MSVC6SP5) allows as an extenstion?
> >
> > Yes, this is a Microsoft extension. VC 7 doesn't even warn. Odd.
>
> a) why not simply: explicit scoped_ptr(std::auto_ptr<T> p):
ptr(p.release()) {} <?>
Yes, this would work. :-)
> b) have you ever considered [standard library containers aside] to have
> auto_ptr-like 'move' semantics made as the default 'mode' for shared-
> ownership ptrs... with something like '.clone()' for explicit addrefs
<?>
No, I haven't encountered a need for this. Why would you want such a smart
pointer?