summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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);