update boost

This commit is contained in:
2023-11-24 12:56:13 -06:00
parent cfc99971af
commit 19d727037a
9260 changed files with 849256 additions and 299957 deletions

View File

@@ -52,7 +52,7 @@ class deleter
segment_manager_pointer mp_mngr;
public:
deleter(segment_manager_pointer pmngr)
deleter(segment_manager_pointer pmngr) BOOST_NOEXCEPT
: mp_mngr(pmngr)
{}

View File

@@ -36,7 +36,7 @@ class bad_weak_ptr
{
public:
virtual char const * what() const BOOST_NOEXCEPT_OR_NOTHROW
virtual char const * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
{ return "boost::interprocess::bad_weak_ptr"; }
};

View File

@@ -25,7 +25,6 @@
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/checked_delete.hpp>
#include <boost/intrusive/pointer_traits.hpp>
#include <boost/interprocess/smart_ptr/detail/bad_weak_ptr.hpp>
#include <boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp>
@@ -47,18 +46,21 @@ template<class T, class VoidAllocator, class Deleter>
class shared_count
{
public:
typedef typename boost::container::
allocator_traits<VoidAllocator>::pointer void_ptr;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
rebind_pointer<T>::type pointer;
pointer_traits<void_ptr>::template
rebind_pointer<T>::type pointer;
private:
typedef sp_counted_impl_pd<VoidAllocator, Deleter> counted_impl;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<counted_impl>::type counted_impl_ptr;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<sp_counted_base>::type counted_base_ptr;
typedef boost::container::allocator_traits<VoidAllocator> vallocator_traits;
@@ -67,11 +69,11 @@ class shared_count
portable_rebind_alloc<counted_impl>::type counted_impl_allocator;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<const Deleter>::type const_deleter_pointer;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<const VoidAllocator>::type const_allocator_pointer;
pointer m_px;
@@ -229,8 +231,10 @@ template<class T, class VoidAllocator, class Deleter>
class weak_count
{
public:
typedef typename boost::container::
allocator_traits<VoidAllocator>::pointer void_ptr;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<T>::type pointer;
private:
@@ -238,10 +242,10 @@ class weak_count
typedef sp_counted_impl_pd<VoidAllocator, Deleter> counted_impl;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<counted_impl>::type counted_impl_ptr;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<sp_counted_base>::type counted_base_ptr;
pointer m_px;

View File

@@ -43,17 +43,19 @@ namespace ipcdetail {
template <class Allocator>
struct scoped_ptr_dealloc_functor
{
typedef typename Allocator::pointer pointer;
typedef typename boost::container::
allocator_traits<Allocator>::pointer pointer;
typedef ipcdetail::integral_constant<unsigned,
boost::interprocess::version<Allocator>::value> alloc_version;
typedef ipcdetail::integral_constant<unsigned, 1> allocator_v1;
typedef ipcdetail::integral_constant<unsigned, 2> allocator_v2;
private:
void priv_deallocate(const typename Allocator::pointer &p, allocator_v1)
void priv_deallocate(const pointer &p, allocator_v1)
{ m_alloc.deallocate(p, 1); }
void priv_deallocate(const typename Allocator::pointer &p, allocator_v2)
void priv_deallocate(const pointer &p, allocator_v2)
{ m_alloc.deallocate_one(p); }
public:
@@ -85,7 +87,11 @@ class sp_counted_impl_pd
allocator_traits<A>::template
portable_rebind_alloc
< const this_type >::type const_this_allocator;
typedef typename this_allocator::pointer this_pointer;
typedef typename boost::container::
allocator_traits<this_allocator>
::pointer this_pointer;
typedef typename boost::container::
allocator_traits<A>::pointer a_pointer;
typedef typename boost::intrusive::
pointer_traits<this_pointer> this_pointer_traits;
@@ -93,10 +99,10 @@ class sp_counted_impl_pd
sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );
typedef typename boost::intrusive::
pointer_traits<typename A::pointer>::template
pointer_traits<a_pointer>::template
rebind_pointer<const D>::type const_deleter_pointer;
typedef typename boost::intrusive::
pointer_traits<typename A::pointer>::template
pointer_traits<a_pointer>::template
rebind_pointer<const A>::type const_allocator_pointer;
typedef typename D::pointer pointer;
@@ -127,8 +133,7 @@ class sp_counted_impl_pd
//Do it now!
scoped_ptr< this_type, scoped_ptr_dealloc_functor<this_allocator> >
deleter_ptr(this_ptr, a_copy);
typedef typename this_allocator::value_type value_type;
ipcdetail::to_raw_pointer(this_ptr)->~value_type();
ipcdetail::to_raw_pointer(this_ptr)->~this_type();
}
void release() // nothrow

View File

@@ -91,49 +91,49 @@ class scoped_ptr
//!Assigns internal pointer as 0 and returns previous pointer. This will
//!avoid deletion on destructor
pointer release()
pointer release() BOOST_NOEXCEPT
{ pointer tmp(m_ptr); m_ptr = 0; return tmp; }
//!Returns a reference to the object pointed to by the stored pointer.
//!Never throws.
reference operator*() const
reference operator*() const BOOST_NOEXCEPT
{ BOOST_ASSERT(m_ptr != 0); return *m_ptr; }
//!Returns the internal stored pointer.
//!Never throws.
pointer &operator->()
pointer &operator->() BOOST_NOEXCEPT
{ BOOST_ASSERT(m_ptr != 0); return m_ptr; }
//!Returns the internal stored pointer.
//!Never throws.
const pointer &operator->() const
const pointer &operator->() const BOOST_NOEXCEPT
{ BOOST_ASSERT(m_ptr != 0); return m_ptr; }
//!Returns the stored pointer.
//!Never throws.
pointer & get()
pointer & get() BOOST_NOEXCEPT
{ return m_ptr; }
//!Returns the stored pointer.
//!Never throws.
const pointer & get() const
const pointer & get() const BOOST_NOEXCEPT
{ return m_ptr; }
typedef pointer this_type::*unspecified_bool_type;
//!Conversion to bool
//!Never throws
operator unspecified_bool_type() const
operator unspecified_bool_type() const BOOST_NOEXCEPT
{ return m_ptr == 0? 0: &this_type::m_ptr; }
//!Returns true if the stored pointer is 0.
//!Never throws.
bool operator! () const // never throws
bool operator! () const BOOST_NOEXCEPT // never throws
{ return m_ptr == 0; }
//!Exchanges the internal pointer and deleter with other scoped_ptr
//!Never throws.
void swap(scoped_ptr & b) // never throws
void swap(scoped_ptr & b) BOOST_NOEXCEPT // never throws
{
::boost::adl_move_swap(static_cast<Deleter&>(*this), static_cast<Deleter&>(b));
::boost::adl_move_swap(m_ptr, b.m_ptr);
@@ -148,7 +148,7 @@ class scoped_ptr
//!Exchanges the internal pointer and deleter with other scoped_ptr
//!Never throws.
template<class T, class D> inline
void swap(scoped_ptr<T, D> & a, scoped_ptr<T, D> & b)
void swap(scoped_ptr<T, D> & a, scoped_ptr<T, D> & b) BOOST_NOEXCEPT
{ a.swap(b); }
//!Returns a copy of the stored pointer

View File

@@ -30,6 +30,7 @@
#include <boost/interprocess/detail/utilities.hpp>
#include <boost/interprocess/detail/cast_tags.hpp>
#include <boost/assert.hpp>
#include <boost/static_assert.hpp>
#include <boost/interprocess/smart_ptr/detail/shared_count.hpp>
#include <boost/interprocess/detail/mpl.hpp>
#include <boost/interprocess/detail/nothrow.hpp>
@@ -37,7 +38,6 @@
#include <boost/interprocess/detail/type_traits.hpp>
#include <boost/interprocess/allocators/allocator.hpp>
#include <boost/interprocess/smart_ptr/deleter.hpp>
#include <boost/static_assert.hpp>
#include <boost/intrusive/pointer_traits.hpp>
#include <iosfwd> // for std::basic_ostream
@@ -56,7 +56,7 @@ namespace ipcdetail{
template<class T, class VoidAllocator, class Deleter>
inline void sp_enable_shared_from_this
(shared_count<T, VoidAllocator, Deleter> const & pn
,enable_shared_from_this<T, VoidAllocator, Deleter> *pe
,enable_shared_from_this<T, VoidAllocator, Deleter> const*pe
,T *ptr)
{
@@ -103,18 +103,20 @@ class shared_ptr
typedef T element_type;
typedef T value_type;
typedef typename boost::container::
allocator_traits<VoidAllocator>::pointer void_ptr;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<T>::type pointer;
typedef typename ipcdetail::add_reference
<value_type>::type reference;
typedef typename ipcdetail::add_reference
<const value_type>::type const_reference;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<const Deleter>::type const_deleter_pointer;
typedef typename boost::intrusive::
pointer_traits<typename VoidAllocator::pointer>::template
pointer_traits<void_ptr>::template
rebind_pointer<const VoidAllocator>::type const_allocator_pointer;
BOOST_COPYABLE_AND_MOVABLE(shared_ptr)
@@ -395,16 +397,16 @@ template<class T, class ManagedMemory>
inline typename managed_shared_ptr<T, ManagedMemory>::type
make_managed_shared_ptr(T *constructed_object, ManagedMemory &managed_memory, const std::nothrow_t &)
{
try{
BOOST_TRY{
return typename managed_shared_ptr<T, ManagedMemory>::type
( constructed_object
, managed_memory.template get_allocator<void>()
, managed_memory.template get_deleter<T>()
);
}
catch(...){
BOOST_CATCH(...){
return typename managed_shared_ptr<T, ManagedMemory>::type();
}
} BOOST_CATCH_END
}

View File

@@ -63,8 +63,10 @@ class weak_ptr
private:
// Borland 5.5.1 specific workarounds
typedef weak_ptr<T, A, D> this_type;
typedef typename boost::container::
allocator_traits<A>::pointer alloc_ptr;
typedef typename boost::intrusive::
pointer_traits<typename A::pointer>::template
pointer_traits<alloc_ptr>::template
rebind_pointer<T>::type pointer;
typedef typename ipcdetail::add_reference
<T>::type reference;