Go to the documentation of this file.
39 #ifndef BLOCXX_AUTOPTR_HPP_INCLUDE_GUARD_
40 #define BLOCXX_AUTOPTR_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
62 template <
class X>
class AutoPtr
145 typedef char type_must_be_complete[
sizeof(X)];
153 inline X* AutoPtr<X>::operator->()
const {
return _ptr;}
227 X* operator->()
const;
233 X& operator[](
unsigned n);
239 const X& operator[](
unsigned i)
const;
280 typedef char type_must_be_complete[
sizeof(X)];
Char16 operator*(const Char16 &arg1, const Char16 &arg2)
AutoPtrVec & operator=(const AutoPtrVec &a)
AutoPtr(const AutoPtr &a)
~AutoPtr()
Destroy this AutoPtr object and the object it points to.
X * release()
Release ownership of the underlying pointer.
X * release()
Release ownership of the underlying array.
void reset(X *p=0)
Delete the array the underlying pointer points to and take ownership of a new array pointer.
~AutoPtrVec()
Destroy this AutoPtrVec object and the array it points to.
AutoPtr & operator=(const AutoPtr &a)
X & operator[](unsigned n)
The AutoPtrVec class provides a simple class for smart pointers to a dynamically allocated array of o...
void reset(X *p=0)
Delete the object the underlying pointer points to and take ownership of a new pointer.
The AutoPtr class provides a simple class for smart pointers to single objects (for multiple,...