Annex D (normative) Compatibility features [depr]

D.10 auto_ptr [depr.auto.ptr]

D.10.1 Class template auto_ptr [auto.ptr]

D.10.1.1 auto_ptr constructors [auto.ptr.cons]

explicit auto_ptr(X* p =0) throw();

Postconditions: *this holds the pointer p.

auto_ptr(auto_ptr& a) throw();

Effects: Calls a.release().

Postconditions: *this holds the pointer returned from a.release().

template<class Y> auto_ptr(auto_ptr<Y>& a) throw();

Requires: Y* can be implicitly converted to X*.

Effects: Calls a.release().

Postconditions: *this holds the pointer returned from a.release().

auto_ptr& operator=(auto_ptr& a) throw();

Requires: The expression delete get() is well formed.

Effects: reset(a.release()).

Returns: *this.

template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();

Requires: Y* can be implicitly converted to X*. The expression delete get() is well formed.

Effects: reset(a.release()).

Returns: *this.

~auto_ptr() throw();

Requires: The expression delete get() is well formed.

Effects: delete get().