Implementation of an auto-pointer class. More...
Public Member Functions | |
AutoPointer (X *p=0) | |
Constructor. | |
AutoPointer (const AutoPointer &a) | |
Constructor. | |
AutoPointer & | operator= (const AutoPointer &rhs) |
Constructor. | |
template<class Y > | |
AutoPointer & | operator= (const AutoPointer< Y > &rhs) |
Constructor. | |
template<class Y > | |
operator AutoPointer< Y > () | |
Converter. | |
~AutoPointer () | |
Destructor. | |
X & | operator* () const |
Converter. | |
X * | operator-> () const |
Converter. | |
X * | get () const |
Converter. | |
X * | release () |
Releaser. | |
void | reset (X *p=0) |
Releaser. |
Implementation of an auto-pointer class.
99% re-implemented from std::auto_ptr. The main difference is the missing "explicit" in the constructor which is needed for the use of my owner-change-idiom. Additionally the new class is slightly modified.
For a complete documentation of auto-pointers read your favorite C++ book.
Definition at line 51 of file AutoPointer.h.