Reference-counting helpers - Swap
This commit is contained in:
parent
ddaa46867d
commit
8e2c773de1
2 changed files with 25 additions and 0 deletions
include/ebcl/inline
|
@ -223,6 +223,23 @@ template<
|
|||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
template< typename T >
|
||||
inline T_RcPtr< T > T_RcPtr< T >::swap(
|
||||
T_RcPtr< T >& other ) noexcept
|
||||
{
|
||||
std::swap( target_ , other.target_ );
|
||||
return *this;
|
||||
}
|
||||
|
||||
template< typename T >
|
||||
inline void swap( T_RcPtr< T >& lhs ,
|
||||
T_RcPtr< T >& rhs ) noexcept
|
||||
{
|
||||
lhs.swap( rhs );
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
template< typename T >
|
||||
inline T_RcPtr< T >::operator bool ( ) const noexcept
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue