summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-11 18:19:17 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-11 19:20:07 (GMT)
commit857e44c156a1dbefcb49bb5792c4384cebd8762a (patch)
tree11947fb81ad9c502627f1b2bb8f090fb8d53c107 /3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp
parent77d4eb7588e113beaa03f3347523b26adefdeb06 (diff)
downloadswift-857e44c156a1dbefcb49bb5792c4384cebd8762a.zip
swift-857e44c156a1dbefcb49bb5792c4384cebd8762a.tar.bz2
Updated Boost to 1.42.
Diffstat (limited to '3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp')
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp b/3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp
index d3bd02b..e72eb21 100644
--- a/3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp
+++ b/3rdParty/Boost/src/boost/smart_ptr/intrusive_ptr.hpp
@@ -77,7 +77,7 @@ public:
template<class U>
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
- intrusive_ptr( intrusive_ptr<U> const & rhs, typename detail::sp_enable_if_convertible<U,T>::type = detail::sp_empty() )
+ intrusive_ptr( intrusive_ptr<U> const & rhs, typename boost::detail::sp_enable_if_convertible<U,T>::type = boost::detail::sp_empty() )
#else
@@ -111,6 +111,23 @@ public:
#endif
+// Move support
+
+#if defined( BOOST_HAS_RVALUE_REFS )
+
+ intrusive_ptr(intrusive_ptr && rhs): px( rhs.px )
+ {
+ rhs.px = 0;
+ }
+
+ intrusive_ptr & operator=(intrusive_ptr && rhs)
+ {
+ this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this);
+ return *this;
+ }
+
+#endif
+
intrusive_ptr & operator=(intrusive_ptr const & rhs)
{
this_type(rhs).swap(*this);