mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-07-31 05:07:21 +02:00
Use static_assert in sp_assert_convertible
This commit is contained in:
@ -195,9 +195,7 @@ inline void sp_enable_shared_from_this( ... )
|
|||||||
|
|
||||||
template< class Y, class T > inline void sp_assert_convertible() BOOST_SP_NOEXCEPT
|
template< class Y, class T > inline void sp_assert_convertible() BOOST_SP_NOEXCEPT
|
||||||
{
|
{
|
||||||
// static_assert( sp_convertible< Y, T >::value );
|
static_assert( sp_convertible< Y, T >::value, "incompatible pointer type" );
|
||||||
typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
|
|
||||||
(void)sizeof( tmp );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// pointer constructor helper
|
// pointer constructor helper
|
||||||
|
Reference in New Issue
Block a user