Topic: additional ctor for auto_ptr: Errata
Author: Richard See <Richard.See@vega.co.uk>
Date: 1997/07/19 Raw View
Richard See carelessly wrote:
> As an aside, I prefer the old style auto_ptr to the new one ...
When describing the old style auto_ptr, I forgot that it didn't have a
standard copy constructor/assignment operator (ie they took a non-const
reference). The class I described throughout my post as 'old style
auto_ptr' is actually a fictitious amalgam of the new auto_ptr and old
one, which has the new auto_ptr definition with the exception of
X* release() const throw();
which would reset the auto_ptrs (mutable) ptr to NULL after being
called. IMHO, this would be a clear violation of the normal meaning of
constness, which would be more understandable than the subtle violation
of the normal meaning of constness which currently takes place.
Apologies for my error.
Richard.
---
[ comp.std.c++ is moderated. To submit articles: try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ]
[ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu ]