Home | History | Annotate | Download | only in backward

Lines Matching refs:auto_ptr

0 // auto_ptr implementation -*- C++ -*-
25 /** @file backward/auto_ptr.h
39 * A wrapper class to provide auto_ptr with reference semantics.
40 * For example, an auto_ptr can be assigned (or constructed from)
41 * the result of a function which returns an auto_ptr by value.
60 * An @c auto_ptr owns the object it holds a pointer to. Copying
61 * an @c auto_ptr copies the pointer and transfers ownership to the
62 * destination. If more than one @c auto_ptr owns the same object
65 * The uses of @c auto_ptr include providing temporary
69 * auto_ptr does not meet the CopyConstructible and Assignable
72 * instantiating a Standard Library container with an @c auto_ptr
77 * Good examples of what can and cannot be done with auto_ptr can
81 * 127. auto_ptr<> conversion issues
85 class auto_ptr
95 * @brief An %auto_ptr is usually constructed from a raw pointer.
101 auto_ptr(element_type* __p = 0) throw() : _M_ptr(__p) { }
104 * @brief An %auto_ptr can be constructed from another %auto_ptr.
105 * @param a Another %auto_ptr of the same type.
110 auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) { }
113 * @brief An %auto_ptr can be constructed from another %auto_ptr.
114 * @param a Another %auto_ptr of a different but related type.
123 auto_ptr(auto_ptr<_Tp1>& __a) throw() : _M_ptr(__a.release()) { }
126 * @brief %auto_ptr assignment operator.
127 * @param a Another %auto_ptr of the same type.
133 auto_ptr&
134 operator=(auto_ptr& __a) throw()
141 * @brief %auto_ptr assignment operator.
142 * @param a Another %auto_ptr of a different but related type.
151 auto_ptr&
152 operator=(auto_ptr<_Tp1>& __a) throw()
159 * When the %auto_ptr goes out of scope, the object it owns is
168 ~auto_ptr() { delete _M_ptr; }
173 * If this %auto_ptr no longer owns anything, then this
206 * @note This %auto_ptr still owns the memory.
219 * @note This %auto_ptr no longer owns the memory. When this object
250 * These operations convert an %auto_ptr into and from an auto_ptr_ref
253 * auto_ptr<Derived> func_returning_auto_ptr(.....);
255 * auto_ptr<Base> ptr = func_returning_auto_ptr(.....);
258 auto_ptr(auto_ptr_ref<element_type> __ref) throw()
261 auto_ptr&
277 operator auto_ptr<_Tp1>() throw()
278 { return auto_ptr<_Tp1>(this->release()); }
284 class auto_ptr<void>