Add intrusive_ptr converting move assignment.

This commit is contained in:
Peter Dimov
2016-05-17 18:43:41 +03:00
parent b7f99ceba6
commit e52905cf3c
2 changed files with 34 additions and 0 deletions
@@ -139,6 +139,13 @@ public:
rhs.px = 0;
}
template<class U>
intrusive_ptr & operator=(intrusive_ptr<U> && rhs) BOOST_NOEXCEPT
{
this_type( static_cast< intrusive_ptr<U> && >( rhs ) ).swap(*this);
return *this;
}
#endif
intrusive_ptr & operator=(intrusive_ptr const & rhs)