Topic: Clarification of auto_ptr in draft
Author: blair@olympia.gps.caltech.edu (Blair Zajac)
Date: 1995/06/16 Raw View
Hi,
I have a few questions about the auto_ptr template class from the draft
standard, section 20.4.5. There are a few points not to clear to me,
since the draft does not explicitly state all the time what a particular
member function returns or does. One can figure this out after examining
the whole class and reading what member functions another member function
calls, but if one just reads about a particular member function, then
it is not too clear. Is this supposed to be that way?
Here are the questions:
1) Presumably release() returns the value of the pointer it was holding
before it set it's own copy of the pointer to 0. It does not call
delete on the pointer it had.
2) Presumably reset() does a delete get() before copying copying its
argument.
Thanks,
Blair Zajac
--
Blair Zajac Division of Geological and Planetary Sciences
blair@olympia.gps.caltech.edu California Institute of Technology
(818) 395-6932 252-21, Pasadena, CA 91125