From 220989104c54b26d6dc9e1ea9ecb7d860aab06f0 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 26 Feb 2007 12:06:42 -0500 Subject: [PATCH] BUG: Fixed implementation of auto_ptr_ref. --- Source/kwsys/auto_ptr.hxx.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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@