diff --git a/Source/kwsys/auto_ptr.hxx.in b/Source/kwsys/auto_ptr.hxx.in index 648dd757f..88c95cdff 100644 --- a/Source/kwsys/auto_ptr.hxx.in +++ b/Source/kwsys/auto_ptr.hxx.in @@ -48,9 +48,8 @@ public: void reset(X* p=0) throw() { if(get() != p) { delete get(); x_ = p; } } auto_ptr(auto_ptr_ref r) throw(): x_(r.p_.release()) {} - template operator auto_ptr_ref() throw() { return *this; } + template operator auto_ptr_ref() throw() { return auto_ptr_ref(*this); } template operator auto_ptr() throw() { return release(); } - auto_ptr& operator=(auto_ptr_ref r) throw() { x_ = r.p_.release(); return *this; } }; } // namespace @KWSYS_NAMESPACE@