39 #ifndef BLOCXX_AUTOPTR_HPP_INCLUDE_GUARD_ 40 #define BLOCXX_AUTOPTR_HPP_INCLUDE_GUARD_ 41 #include "blocxx/BLOCXX_config.h" 145 typedef char type_must_be_complete[
sizeof(X)];
233 X& operator[](
unsigned n);
239 const X& operator[](
unsigned i)
const;
280 typedef char type_must_be_complete[
sizeof(X)];
~AutoPtr()
Destroy this AutoPtr object and the object it points to.
void reset(X *p=0)
Delete the object the underlying pointer points to and take ownership of a new pointer.
AutoPtrVec(const AutoPtrVec &a)
~AutoPtrVec()
Destroy this AutoPtrVec object and the array it points to.
AutoPtr(const AutoPtr &a)
void reset(X *p=0)
Delete the array the underlying pointer points to and take ownership of a new array pointer...
The AutoPtr class provides a simple class for smart pointers to single objects (for multiple...
X & operator[](unsigned n)
The AutoPtrVec class provides a simple class for smart pointers to a dynamically allocated array of o...
X * release()
Release ownership of the underlying array.
AutoPtr & operator=(const AutoPtr &a)
X * release()
Release ownership of the underlying pointer.
AutoPtrVec & operator=(const AutoPtrVec &a)