Reference-counting helpers - Copy/move cons/ass w/ casts

Added tests and fixed a few bugs.
This commit is contained in:
Emmanuel BENOîT 2019-01-02 17:14:08 +01:00
parent e8e0e8101d
commit 6afe127d13
3 changed files with 189 additions and 2 deletions
include/ebcl/inline

View file

@ -168,7 +168,9 @@ template<
T_RcPtr< Q >&& other ) noexcept
: target_{ nullptr }
{
std::swap( target_ , other.target_ );
T* const ptr{ (T*) other.target_ };
other.target_ = nullptr;
target_ = ptr;
}
template< typename T >