Skip to content

Commit aa1a9ef

Browse files
committed
Use static_assert in sp_assert_convertible
1 parent 63ac28d commit aa1a9ef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/boost/smart_ptr/shared_ptr.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ inline void sp_enable_shared_from_this( ... )
195195

196196
template< class Y, class T > inline void sp_assert_convertible() BOOST_SP_NOEXCEPT
197197
{
198-
// static_assert( sp_convertible< Y, T >::value );
199-
typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
200-
(void)sizeof( tmp );
198+
static_assert( sp_convertible< Y, T >::value, "incompatible pointer type" );
201199
}
202200

203201
// pointer constructor helper

0 commit comments

Comments
 (0)