Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r81271 - trunk/boost/smart_ptr
From: pdimov_at_[hidden]
Date: 2012-11-09 18:27:03


Author: pdimov
Date: 2012-11-09 18:27:02 EST (Fri, 09 Nov 2012)
New Revision: 81271
URL: http://svn.boost.org/trac/boost/changeset/81271

Log:
Keep old definition of sp_assert_convertible when BOOST_SP_NO_SP_CONVERTIBLE is set.
Text files modified:
   trunk/boost/smart_ptr/shared_ptr.hpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: trunk/boost/smart_ptr/shared_ptr.hpp
==============================================================================
--- trunk/boost/smart_ptr/shared_ptr.hpp (original)
+++ trunk/boost/smart_ptr/shared_ptr.hpp 2012-11-09 18:27:02 EST (Fri, 09 Nov 2012)
@@ -243,9 +243,18 @@
 
 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


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk