BUG: Fixed implementation of auto_ptr_ref.

This commit is contained in:
Brad King 2007-02-26 12:06:42 -05:00
parent 90974ea1d6
commit 220989104c
1 changed files with 1 additions and 2 deletions

View File

@ -48,9 +48,8 @@ public:
void reset(X* p=0) throw() { if(get() != p) { delete get(); x_ = p; } } void reset(X* p=0) throw() { if(get() != p) { delete get(); x_ = p; } }
auto_ptr(auto_ptr_ref<X> r) throw(): x_(r.p_.release()) {} auto_ptr(auto_ptr_ref<X> r) throw(): x_(r.p_.release()) {}
template <class Y> operator auto_ptr_ref<Y>() throw() { return *this; } template <class Y> operator auto_ptr_ref<Y>() throw() { return auto_ptr_ref<Y>(*this); }
template <class Y> operator auto_ptr<Y>() throw() { return release(); } template <class Y> operator auto_ptr<Y>() throw() { return release(); }
auto_ptr& operator=(auto_ptr_ref<X> r) throw() { x_ = r.p_.release(); return *this; }
}; };
} // namespace @KWSYS_NAMESPACE@ } // namespace @KWSYS_NAMESPACE@