Skip to content
Snippets Groups Projects
Commit 62ad6842 authored by Brad King's avatar Brad King
Browse files

BUG: Fixed implementation of auto_ptr_ref.

parent 7d6e5fe4
No related branches found
No related tags found
No related merge requests found
......@@ -48,9 +48,8 @@ public:
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()) {}
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(); }
auto_ptr& operator=(auto_ptr_ref<X> r) throw() { x_ = r.p_.release(); return *this; }
};
} // namespace @KWSYS_NAMESPACE@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment