Use static_assert in sp_assert_convertible

This commit is contained in:
Peter Dimov
2024-09-25 20:15:31 +03:00
parent 63ac28d26f
commit aa1a9ef2d7

View File

@ -195,9 +195,7 @@ inline void sp_enable_shared_from_this( ... )
template< class Y, class T > inline void sp_assert_convertible() BOOST_SP_NOEXCEPT
{
// static_assert( sp_convertible< Y, T >::value );
typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
(void)sizeof( tmp );
static_assert( sp_convertible< Y, T >::value, "incompatible pointer type" );
}
// pointer constructor helper