summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-02-26 17:06:42 (GMT)
committerBrad King <brad.king@kitware.com>2007-02-26 17:06:42 (GMT)
commit220989104c54b26d6dc9e1ea9ecb7d860aab06f0 (patch)
treed3b3edebd0b6ddd9bc271c41c6fc9222bd3eac62 /Source/kwsys
parent90974ea1d6310a8a2f8bfc2febaab66125992783 (diff)
downloadCMake-220989104c54b26d6dc9e1ea9ecb7d860aab06f0.zip
CMake-220989104c54b26d6dc9e1ea9ecb7d860aab06f0.tar.gz
CMake-220989104c54b26d6dc9e1ea9ecb7d860aab06f0.tar.bz2
BUG: Fixed implementation of auto_ptr_ref.
Diffstat (limited to 'Source/kwsys')
-rw-r--r--Source/kwsys/auto_ptr.hxx.in3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/kwsys/auto_ptr.hxx.in b/Source/kwsys/auto_ptr.hxx.in
index 648dd75..88c95cd 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<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@