1
0
forked from boostorg/core

Avoid self-assignment warning in ref_ct_test.cpp

This commit is contained in:
Peter Dimov
2021-11-01 01:41:54 +02:00
parent 62d1b1bb59
commit 370a74c249

View File

@ -21,10 +21,16 @@ void ref_test(boost::reference_wrapper<U>)
BOOST_STATIC_ASSERT((boost::core::is_same<T,type>::value)); BOOST_STATIC_ASSERT((boost::core::is_same<T,type>::value));
} }
template< typename T >
void assignable_test_(T x1, T x2)
{
x1 = x2;
}
template< typename T > template< typename T >
void assignable_test(T x) void assignable_test(T x)
{ {
x = x; assignable_test_( x, x );
} }
template< bool R, typename T > template< bool R, typename T >