Lines Matching refs:auto_ptr
5 template<typename X> struct auto_ptr {
10 explicit auto_ptr(X* p =0) throw() : px(p) {}
11 auto_ptr(auto_ptr& r) throw() : px(r.release()) {} // ERROR - candidate
13 auto_ptr(auto_ptr<Y>& r) throw() : px(r.release()) {}// ERROR - candidate
15 auto_ptr& operator=(auto_ptr& r) throw() {
19 template<typename Y> auto_ptr& operator=(auto_ptr<Y>& r) throw() {
24 ~auto_ptr() { delete px; }
32 auto_ptr(auto_ptr_ref<X> r) throw() : px(r.py) {} // ERROR - candidate
36 template<typename Y> operator auto_ptr<Y>() throw() {
37 return auto_ptr<Y>(release());
44 auto_ptr<Derived> f() { auto_ptr<Derived> null(0); return null; }
45 void g(auto_ptr<Derived>) { }
46 void h(auto_ptr<Base>) { }
49 auto_ptr<Base> x(f());
50 auto_ptr<Derived> y(f());