Keep old definition of sp_assert_convertible when BOOST_SP_NO_SP_CONVERTIBLE is set.

[SVN r81271]
This commit is contained in:
Peter Dimov
2012-11-09 23:27:02 +00:00
parent 58a46f4e55
commit 2aaa913b11

View File

@ -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()
{
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
// static_assert( sp_convertible< Y, T >::value );
typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
(void)sizeof( tmp );
#else
T* p = static_cast< Y* >( 0 );
(void)p;
#endif
}
// pointer constructor helper