summaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/tree/containers.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsd/xsd/cxx/tree/containers.hxx')
-rw-r--r--libxsd/xsd/cxx/tree/containers.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/libxsd/xsd/cxx/tree/containers.hxx b/libxsd/xsd/cxx/tree/containers.hxx
index 8ea04d2..ba76eae 100644
--- a/libxsd/xsd/cxx/tree/containers.hxx
+++ b/libxsd/xsd/cxx/tree/containers.hxx
@@ -1338,7 +1338,8 @@ namespace xsd
{
ptr& p (*position.base ());
p->_container (0);
- r.reset (static_cast<T*> (p.release ()));
+ std::auto_ptr<T> tmp (static_cast<T*> (p.release ()));
+ r = tmp;
if (erase)
return iterator (v_.erase (position.base ()));