Fixes for old compilers.

[SVN r45069]
This commit is contained in:
Peter Dimov
2008-05-03 15:33:06 +00:00
parent 0c4aaef77c
commit da323af72d
2 changed files with 11 additions and 2 deletions

View File

@ -21,7 +21,9 @@
// spinlock_pool<2> is reserved for shared_ptr atomic access // spinlock_pool<2> is reserved for shared_ptr atomic access
// //
#include <boost/config.hpp>
#include <boost/detail/spinlock.hpp> #include <boost/detail/spinlock.hpp>
#include <cstddef>
namespace boost namespace boost
{ {
@ -39,7 +41,7 @@ public:
static spinlock & spinlock_for( void const * pv ) static spinlock & spinlock_for( void const * pv )
{ {
size_t i = reinterpret_cast< size_t >( pv ) % 41; std::size_t i = reinterpret_cast< std::size_t >( pv ) % 41;
return pool_[ i ]; return pool_[ i ];
} }

View File

@ -13,9 +13,10 @@
// http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html // http://www.boost.org/libs/smart_ptr/enable_shared_from_this.html
// //
#include <boost/config.hpp>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/config.hpp> #include <boost/detail/workaround.hpp>
namespace boost namespace boost
{ {
@ -77,6 +78,12 @@ private:
} }
} }
#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, <= 0x551 )
public:
#endif
template<typename U> template<typename U>
void sp_accept_owner( shared_ptr<U> & owner ) const void sp_accept_owner( shared_ptr<U> & owner ) const
{ {