update boost & add container lib (#204)
* remove boost headers * boost 1.78
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user