forked from boostorg/smart_ptr
Keep old definition of sp_assert_convertible when BOOST_SP_NO_SP_CONVERTIBLE is set.
[SVN r81271]
This commit is contained in:
@@ -243,9 +243,18 @@ template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R
|
|||||||
|
|
||||||
template< class Y, class T > inline void sp_assert_convertible()
|
template< class Y, class T > inline void sp_assert_convertible()
|
||||||
{
|
{
|
||||||
|
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
|
||||||
|
|
||||||
// static_assert( sp_convertible< Y, T >::value );
|
// static_assert( sp_convertible< Y, T >::value );
|
||||||
typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
|
typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
|
||||||
(void)sizeof( tmp );
|
(void)sizeof( tmp );
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
T* p = static_cast< Y* >( 0 );
|
||||||
|
(void)p;
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// pointer constructor helper
|
// pointer constructor helper
|
||||||
|
Reference in New Issue
Block a user