BUG: Assignment should always use reset().

This commit is contained in:
Brad King 2007-02-28 09:36:08 -05:00
parent 5ba5c450e6
commit b1aae98926
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ public:
auto_ptr(auto_ptr_ref<X> r) throw(): x_(r.p_.release()) {}
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(); }
auto_ptr& operator=(auto_ptr_ref<X> r) throw() { x_ = r.p_.release(); return *this; }
auto_ptr& operator=(auto_ptr_ref<X> r) throw() { reset(r.p_.release()); return *this; }
};
} // namespace @KWSYS_NAMESPACE@