mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2026-01-06 06:28:08 +01:00
Update boost to 1.68.0
Keeps the boost libraries up to date. This also silences informational messages that get spammed throughout the build, such as: "Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an update Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message." Which makes the compilation process a lot less noisy on Windows. It's now much easier to actually spot warnings that occur.
This commit is contained in:
parent
d80e506e17
commit
db95c7fe31
191 changed files with 10342 additions and 6193 deletions
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <typename T>
|
||||
BOOST_CONTAINER_FORCEINLINE T* addressof(T& obj)
|
||||
|
|
@ -34,7 +34,7 @@ BOOST_CONTAINER_FORCEINLINE T* addressof(T& obj)
|
|||
)));
|
||||
}
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include <boost/assert.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
|
||||
namespace boost { namespace container { namespace container_detail {
|
||||
namespace boost { namespace container { namespace dtl {
|
||||
|
||||
template<class Allocator, class FwdIt, class Iterator>
|
||||
struct move_insert_range_proxy
|
||||
|
|
@ -125,8 +125,16 @@ struct insert_value_initialized_n_proxy
|
|||
void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{ boost::container::uninitialized_value_init_alloc_n(a, n, p); }
|
||||
|
||||
void copy_n_and_update(Allocator &, Iterator, size_type) const
|
||||
{ BOOST_ASSERT(false); }
|
||||
void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{
|
||||
for (; 0 < n; --n, ++p){
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type stor;
|
||||
value_type &v = *static_cast<value_type *>(static_cast<void *>(stor.data));
|
||||
alloc_traits::construct(a, &v);
|
||||
value_destructor<Allocator> on_exit(a, v); (void)on_exit;
|
||||
*p = ::boost::move(v);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<class Allocator, class Iterator>
|
||||
|
|
@ -139,8 +147,18 @@ struct insert_default_initialized_n_proxy
|
|||
void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{ boost::container::uninitialized_default_init_alloc_n(a, n, p); }
|
||||
|
||||
void copy_n_and_update(Allocator &, Iterator, size_type) const
|
||||
{ BOOST_ASSERT(false); }
|
||||
void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
|
||||
{
|
||||
if(!is_pod<value_type>::value){
|
||||
for (; 0 < n; --n, ++p){
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type stor;
|
||||
value_type &v = *static_cast<value_type *>(static_cast<void *>(stor.data));
|
||||
alloc_traits::construct(a, &v, default_init);
|
||||
value_destructor<Allocator> on_exit(a, v); (void)on_exit;
|
||||
*p = ::boost::move(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template<class Allocator, class Iterator>
|
||||
|
|
@ -208,7 +226,7 @@ insert_copy_proxy<Allocator, It> get_insert_value_proxy(const typename boost::co
|
|||
return insert_copy_proxy<Allocator, It>(v);
|
||||
}
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
|
|
@ -217,7 +235,7 @@ insert_copy_proxy<Allocator, It> get_insert_value_proxy(const typename boost::co
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class Allocator, class Iterator, class ...Args>
|
||||
struct insert_nonmovable_emplace_proxy
|
||||
|
|
@ -271,7 +289,7 @@ struct insert_emplace_proxy
|
|||
{
|
||||
BOOST_ASSERT(n ==1); (void)n;
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(&v));
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(v.data));
|
||||
alloc_traits::construct(a, vp,
|
||||
::boost::forward<Args>(get<IdxPack>(this->args_))...);
|
||||
BOOST_TRY{
|
||||
|
|
@ -301,7 +319,7 @@ struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allo
|
|||
//Any problem is solvable with an extra layer of indirection? ;-)
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
|
@ -321,7 +339,7 @@ struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allo
|
|||
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
|
@ -330,7 +348,7 @@ struct insert_emplace_proxy<Allocator, Iterator
|
|||
{}
|
||||
};
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
|
|
@ -338,7 +356,7 @@ struct insert_emplace_proxy<Allocator, Iterator
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
#define BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE(N) \
|
||||
template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
|
||||
|
|
@ -382,7 +400,7 @@ struct insert_emplace_proxy_arg##N\
|
|||
BOOST_ASSERT(n == 1); (void)n;\
|
||||
typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
|
||||
BOOST_ASSERT((((size_type)(&v)) % alignment_of<value_type>::value) == 0);\
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(&v));\
|
||||
value_type *vp = static_cast<value_type *>(static_cast<void *>(v.data));\
|
||||
alloc_traits::construct(a, vp BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
|
||||
BOOST_TRY{\
|
||||
*p = ::boost::move(*vp);\
|
||||
|
|
@ -437,7 +455,7 @@ struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container:
|
|||
//Any problem is solvable with an extra layer of indirection? ;-)
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
|
@ -457,7 +475,7 @@ struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container:
|
|||
|
||||
template<class Allocator, class Iterator>
|
||||
struct insert_emplace_proxy_arg1<Allocator, Iterator
|
||||
, typename boost::container::container_detail::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
, typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
|
||||
>
|
||||
: public insert_copy_proxy<Allocator, Iterator>
|
||||
{
|
||||
|
|
@ -468,7 +486,7 @@ struct insert_emplace_proxy_arg1<Allocator, Iterator
|
|||
|
||||
#endif
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
|
|
|
|||
|
|
@ -24,36 +24,36 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void swap_alloc(AllocatorType &, AllocatorType &, container_detail::false_type)
|
||||
inline void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
|
||||
BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void swap_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type)
|
||||
inline void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
|
||||
{ boost::adl_move_swap(l, r); }
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void assign_alloc(AllocatorType &, const AllocatorType &, container_detail::false_type)
|
||||
inline void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
|
||||
BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void assign_alloc(AllocatorType &l, const AllocatorType &r, container_detail::true_type)
|
||||
inline void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
|
||||
{ l = r; }
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void move_alloc(AllocatorType &, AllocatorType &, container_detail::false_type)
|
||||
inline void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
|
||||
BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{}
|
||||
|
||||
template<class AllocatorType>
|
||||
inline void move_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type)
|
||||
inline void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
|
||||
{ l = ::boost::move(r); }
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class Allocator, unsigned Version = boost::container::container_detail::version<Allocator>::value>
|
||||
template<class Allocator, unsigned Version = boost::container::dtl::version<Allocator>::value>
|
||||
struct allocator_version_traits
|
||||
{
|
||||
typedef ::boost::container::container_detail::integral_constant
|
||||
typedef ::boost::container::dtl::integral_constant
|
||||
<unsigned, Version> alloc_version;
|
||||
|
||||
typedef typename Allocator::multiallocation_chain multiallocation_chain;
|
||||
|
|
@ -67,7 +67,7 @@ struct allocator_version_traits
|
|||
template<class Allocator>
|
||||
struct allocator_version_traits<Allocator, 1>
|
||||
{
|
||||
typedef ::boost::container::container_detail::integral_constant
|
||||
typedef ::boost::container::dtl::integral_constant
|
||||
<unsigned, 1> alloc_version;
|
||||
|
||||
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
|
||||
|
|
@ -76,9 +76,9 @@ struct allocator_version_traits<Allocator, 1>
|
|||
|
||||
typedef typename boost::intrusive::pointer_traits<pointer>::
|
||||
template rebind_pointer<void>::type void_ptr;
|
||||
typedef container_detail::basic_multiallocation_chain
|
||||
typedef dtl::basic_multiallocation_chain
|
||||
<void_ptr> multialloc_cached_counted;
|
||||
typedef boost::container::container_detail::
|
||||
typedef boost::container::dtl::
|
||||
transform_multiallocation_chain
|
||||
< multialloc_cached_counted, value_type> multiallocation_chain;
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ struct allocator_version_traits<Allocator, 1>
|
|||
}
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source)
|
|||
template<class DstIt, class U, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator<U, D>)
|
||||
{
|
||||
container_detail::value_init<U> val;
|
||||
dtl::value_init<U> val;
|
||||
*dest = boost::move(val.get());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class AllocatorOrContainer, class ToType, bool = is_container<AllocatorOrContainer>::value>
|
||||
struct container_or_allocator_rebind_impl
|
||||
|
|
@ -42,7 +42,7 @@ struct container_or_allocator_rebind
|
|||
: container_or_allocator_rebind_impl<AllocatorOrContainer, ToType>
|
||||
{};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class Cont, class U>
|
||||
struct container_rebind;
|
||||
|
|
@ -251,7 +251,7 @@ namespace container_detail {
|
|||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -34,11 +34,16 @@
|
|||
// other
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
// std
|
||||
#include <cstring> //for emmove/memcpy
|
||||
#include <cstring> //for memmove/memcpy
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wclass-memaccess"
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class I>
|
||||
struct are_elements_contiguous
|
||||
|
|
@ -65,17 +70,15 @@ struct are_elements_contiguous< ::boost::move_iterator<It> >
|
|||
: are_elements_contiguous<It>
|
||||
{};
|
||||
|
||||
} //namespace dtl {
|
||||
|
||||
/////////////////////////
|
||||
// predeclarations
|
||||
/////////////////////////
|
||||
|
||||
template<class Pointer>
|
||||
class vector_iterator;
|
||||
template <class Pointer, bool IsConst>
|
||||
class vec_iterator;
|
||||
|
||||
template<class Pointer>
|
||||
class vector_const_iterator;
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
|
||||
namespace interprocess {
|
||||
|
|
@ -87,20 +90,14 @@ class offset_ptr;
|
|||
|
||||
namespace container {
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
/////////////////////////
|
||||
//vector_[const_]iterator
|
||||
/////////////////////////
|
||||
|
||||
template<class Pointer>
|
||||
struct are_elements_contiguous<boost::container::container_detail::vector_iterator<Pointer> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template<class Pointer>
|
||||
struct are_elements_contiguous<boost::container::container_detail::vector_const_iterator<Pointer> >
|
||||
template <class Pointer, bool IsConst>
|
||||
struct are_elements_contiguous<boost::container::vec_iterator<Pointer, IsConst> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
|
@ -130,7 +127,7 @@ template <typename I, typename O>
|
|||
struct is_memtransfer_copy_assignable
|
||||
: boost::move_detail::and_
|
||||
< are_contiguous_and_same<I, O>
|
||||
, container_detail::is_trivially_copy_assignable< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
, dtl::is_trivially_copy_assignable< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
>
|
||||
{};
|
||||
|
||||
|
|
@ -138,28 +135,28 @@ template <typename I, typename O>
|
|||
struct is_memtransfer_copy_constructible
|
||||
: boost::move_detail::and_
|
||||
< are_contiguous_and_same<I, O>
|
||||
, container_detail::is_trivially_copy_constructible< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
, dtl::is_trivially_copy_constructible< typename ::boost::container::iterator_traits<I>::value_type >
|
||||
>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct enable_if_memtransfer_copy_constructible
|
||||
: enable_if<container_detail::is_memtransfer_copy_constructible<I, O>, R>
|
||||
: enable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct disable_if_memtransfer_copy_constructible
|
||||
: disable_if<container_detail::is_memtransfer_copy_constructible<I, O>, R>
|
||||
: disable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct enable_if_memtransfer_copy_assignable
|
||||
: enable_if<container_detail::is_memtransfer_copy_assignable<I, O>, R>
|
||||
: enable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename O, typename R>
|
||||
struct disable_if_memtransfer_copy_assignable
|
||||
: disable_if<container_detail::is_memtransfer_copy_assignable<I, O>, R>
|
||||
: disable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
|
||||
{};
|
||||
|
||||
template
|
||||
|
|
@ -224,44 +221,44 @@ struct is_memzero_initializable
|
|||
{
|
||||
typedef typename ::boost::container::iterator_traits<O>::value_type value_type;
|
||||
static const bool value = are_elements_contiguous<O>::value &&
|
||||
( container_detail::is_integral<value_type>::value || container_detail::is_enum<value_type>::value
|
||||
( dtl::is_integral<value_type>::value || dtl::is_enum<value_type>::value
|
||||
#if defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
|
||||
|| container_detail::is_pointer<value_type>::value
|
||||
|| dtl::is_pointer<value_type>::value
|
||||
#endif
|
||||
#if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO)
|
||||
|| container_detail::is_floating_point<value_type>::value
|
||||
|| dtl::is_floating_point<value_type>::value
|
||||
#endif
|
||||
#if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO) && defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
|
||||
|| container_detail::is_pod<value_type>::value
|
||||
|| dtl::is_pod<value_type>::value
|
||||
#endif
|
||||
);
|
||||
};
|
||||
|
||||
template <typename O, typename R>
|
||||
struct enable_if_memzero_initializable
|
||||
: enable_if_c<container_detail::is_memzero_initializable<O>::value, R>
|
||||
: enable_if_c<dtl::is_memzero_initializable<O>::value, R>
|
||||
{};
|
||||
|
||||
template <typename O, typename R>
|
||||
struct disable_if_memzero_initializable
|
||||
: enable_if_c<!container_detail::is_memzero_initializable<O>::value, R>
|
||||
: enable_if_c<!dtl::is_memzero_initializable<O>::value, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename R>
|
||||
struct enable_if_trivially_destructible
|
||||
: enable_if_c < container_detail::is_trivially_destructible
|
||||
: enable_if_c < dtl::is_trivially_destructible
|
||||
<typename boost::container::iterator_traits<I>::value_type>::value
|
||||
, R>
|
||||
{};
|
||||
|
||||
template <typename I, typename R>
|
||||
struct disable_if_trivially_destructible
|
||||
: enable_if_c <!container_detail::is_trivially_destructible
|
||||
: enable_if_c <!dtl::is_trivially_destructible
|
||||
<typename boost::container::iterator_traits<I>::value_type>::value
|
||||
, R>
|
||||
{};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -281,7 +278,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc(Allocator &a, I f, I l, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
|
@ -305,9 +302,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -326,7 +323,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
|
@ -350,9 +347,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_move_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -371,7 +368,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_move_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
|
@ -395,9 +392,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_move_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -416,7 +413,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc(Allocator &a, I f, I l, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
|
@ -440,9 +437,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -461,7 +458,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
|
@ -485,9 +482,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
|
||||
uninitialized_copy_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -506,7 +503,7 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_copy_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
|
@ -530,9 +527,9 @@ template
|
|||
<typename Allocator,
|
||||
typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
|
||||
uninitialized_copy_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -550,7 +547,7 @@ inline typename container_detail::enable_if_memtransfer_copy_constructible<I, F,
|
|||
template
|
||||
<typename Allocator,
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memzero_initializable<F, F>::type
|
||||
inline typename dtl::disable_if_memzero_initializable<F, F>::type
|
||||
uninitialized_value_init_alloc_n(Allocator &a, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
F back = r;
|
||||
|
|
@ -573,7 +570,7 @@ inline typename container_detail::disable_if_memzero_initializable<F, F>::type
|
|||
template
|
||||
<typename Allocator,
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memzero_initializable<F, F>::type
|
||||
inline typename dtl::enable_if_memzero_initializable<F, F>::type
|
||||
uninitialized_value_init_alloc_n(Allocator &, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<F>::value_type value_type;
|
||||
|
|
@ -698,7 +695,7 @@ inline F uninitialized_fill_alloc_n(Allocator &a, const T &v, typename boost::co
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy(I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
|
|
@ -711,9 +708,9 @@ inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -725,7 +722,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy_n(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
|
@ -739,9 +736,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
copy_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -753,7 +750,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
|
@ -767,9 +764,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -781,7 +778,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source_dest(I f, U n, F &r)
|
||||
{
|
||||
while (n--) {
|
||||
|
|
@ -795,9 +792,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
copy_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source_dest(f, n, r); }
|
||||
{ return dtl::memmove_n_source_dest(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -808,7 +805,7 @@ inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move(I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
|
|
@ -821,9 +818,9 @@ inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove(f, l, r); }
|
||||
{ return dtl::memmove(f, l, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -835,7 +832,7 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_n(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
|
@ -849,9 +846,9 @@ template
|
|||
<typename I, // I models InputIterator
|
||||
typename U, // U models unsigned integral constant
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n(f, n, r); }
|
||||
{ return dtl::memmove_n(f, n, r); }
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
@ -863,7 +860,7 @@ inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>
|
|||
template
|
||||
<typename I, // I models BidirectionalIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_backward(I f, I l, F r)
|
||||
{
|
||||
while (f != l) {
|
||||
|
|
@ -876,7 +873,7 @@ inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, F
|
|||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
|
||||
move_backward(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<I>::value_type value_type;
|
||||
|
|
@ -896,7 +893,7 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source_dest(I f, U n, F &r)
|
||||
{
|
||||
while (n--) {
|
||||
|
|
@ -910,9 +907,9 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source_dest(f, n, r); }
|
||||
{ return dtl::memmove_n_source_dest(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -924,7 +921,7 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source(I f, U n, F r)
|
||||
{
|
||||
while (n--) {
|
||||
|
|
@ -938,9 +935,9 @@ template
|
|||
<typename I // I models InputIterator
|
||||
,typename U // U models unsigned integral constant
|
||||
,typename F> // F models ForwardIterator
|
||||
inline typename container_detail::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
|
||||
move_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
|
||||
{ return container_detail::memmove_n_source(f, n, r); }
|
||||
{ return dtl::memmove_n_source(f, n, r); }
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
@ -952,7 +949,7 @@ template
|
|||
<typename Allocator
|
||||
,typename I // I models InputIterator
|
||||
,typename U> // U models unsigned integral constant
|
||||
inline typename container_detail::disable_if_trivially_destructible<I, void>::type
|
||||
inline typename dtl::disable_if_trivially_destructible<I, void>::type
|
||||
destroy_alloc_n(Allocator &a, I f, U n)
|
||||
{
|
||||
while(n){
|
||||
|
|
@ -966,7 +963,7 @@ template
|
|||
<typename Allocator
|
||||
,typename I // I models InputIterator
|
||||
,typename U> // U models unsigned integral constant
|
||||
inline typename container_detail::enable_if_trivially_destructible<I, void>::type
|
||||
inline typename dtl::enable_if_trivially_destructible<I, void>::type
|
||||
destroy_alloc_n(Allocator &, I, U)
|
||||
{}
|
||||
|
||||
|
|
@ -982,7 +979,7 @@ template
|
|||
,typename F // F models ForwardIterator
|
||||
,typename G // G models ForwardIterator
|
||||
>
|
||||
inline typename container_detail::disable_if_memtransfer_copy_assignable<F, G, void>::type
|
||||
inline typename dtl::disable_if_memtransfer_copy_assignable<F, G, void>::type
|
||||
deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
|
||||
, G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
|
||||
{
|
||||
|
|
@ -1002,21 +999,21 @@ template
|
|||
,typename F // F models ForwardIterator
|
||||
,typename G // G models ForwardIterator
|
||||
>
|
||||
inline typename container_detail::enable_if_c
|
||||
< container_detail::is_memtransfer_copy_assignable<F, G>::value && (MaxTmpBytes <= DeepSwapAllocNMaxStorage) && false
|
||||
inline typename dtl::enable_if_c
|
||||
< dtl::is_memtransfer_copy_assignable<F, G>::value && (MaxTmpBytes <= DeepSwapAllocNMaxStorage) && false
|
||||
, void>::type
|
||||
deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
|
||||
, G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
|
||||
{
|
||||
typedef typename allocator_traits<Allocator>::value_type value_type;
|
||||
typedef typename container_detail::aligned_storage
|
||||
<MaxTmpBytes, container_detail::alignment_of<value_type>::value>::type storage_type;
|
||||
typedef typename dtl::aligned_storage
|
||||
<MaxTmpBytes, dtl::alignment_of<value_type>::value>::type storage_type;
|
||||
storage_type storage;
|
||||
|
||||
const std::size_t n_i_bytes = sizeof(value_type)*n_i;
|
||||
void *const large_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f));
|
||||
void *const short_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f));
|
||||
void *const stora_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(storage));
|
||||
void *const stora_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(storage.data));
|
||||
std::memcpy(stora_ptr, large_ptr, n_i_bytes);
|
||||
std::memcpy(large_ptr, short_ptr, n_i_bytes);
|
||||
std::memcpy(short_ptr, stora_ptr, n_i_bytes);
|
||||
|
|
@ -1032,22 +1029,22 @@ template
|
|||
,typename F // F models ForwardIterator
|
||||
,typename G // G models ForwardIterator
|
||||
>
|
||||
inline typename container_detail::enable_if_c
|
||||
< container_detail::is_memtransfer_copy_assignable<F, G>::value && true//(MaxTmpBytes > DeepSwapAllocNMaxStorage)
|
||||
inline typename dtl::enable_if_c
|
||||
< dtl::is_memtransfer_copy_assignable<F, G>::value && true//(MaxTmpBytes > DeepSwapAllocNMaxStorage)
|
||||
, void>::type
|
||||
deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
|
||||
, G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
|
||||
{
|
||||
typedef typename allocator_traits<Allocator>::value_type value_type;
|
||||
typedef typename container_detail::aligned_storage
|
||||
<DeepSwapAllocNMaxStorage, container_detail::alignment_of<value_type>::value>::type storage_type;
|
||||
typedef typename dtl::aligned_storage
|
||||
<DeepSwapAllocNMaxStorage, dtl::alignment_of<value_type>::value>::type storage_type;
|
||||
storage_type storage;
|
||||
const std::size_t sizeof_storage = sizeof(storage);
|
||||
|
||||
std::size_t n_i_bytes = sizeof(value_type)*n_i;
|
||||
char *large_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f)));
|
||||
char *short_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f)));
|
||||
char *stora_ptr = static_cast<char*>(static_cast<void*>(&storage));
|
||||
char *stora_ptr = static_cast<char*>(static_cast<void*>(storage.data));
|
||||
|
||||
std::size_t szt_times = n_i_bytes/sizeof_storage;
|
||||
const std::size_t szt_rem = n_i_bytes%sizeof_storage;
|
||||
|
|
@ -1149,4 +1146,9 @@ void move_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_tr
|
|||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
//!A deleter for scoped_ptr that deallocates the memory
|
||||
//!allocated for an object using a STL allocator.
|
||||
|
|
@ -39,8 +39,8 @@ struct scoped_deallocator
|
|||
{
|
||||
typedef allocator_traits<Allocator> allocator_traits_type;
|
||||
typedef typename allocator_traits_type::pointer pointer;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<Allocator>::value> alloc_version;
|
||||
|
||||
private:
|
||||
|
|
@ -142,8 +142,8 @@ struct scoped_destroy_deallocator
|
|||
typedef boost::container::allocator_traits<Allocator> AllocTraits;
|
||||
typedef typename AllocTraits::pointer pointer;
|
||||
typedef typename AllocTraits::size_type size_type;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<Allocator>::value> alloc_version;
|
||||
|
||||
scoped_destroy_deallocator(pointer p, Allocator& a)
|
||||
|
|
@ -296,8 +296,8 @@ class allocator_destroyer
|
|||
typedef boost::container::allocator_traits<Allocator> AllocTraits;
|
||||
typedef typename AllocTraits::value_type value_type;
|
||||
typedef typename AllocTraits::pointer pointer;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<Allocator>::value> alloc_version;
|
||||
|
||||
private:
|
||||
|
|
@ -369,7 +369,7 @@ class allocator_multialloc_chain_node_deallocator
|
|||
}
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class Container>
|
||||
struct is_container
|
||||
|
|
@ -48,7 +48,7 @@ struct is_container
|
|||
has_member_function_callable_with_empty<const Container>::value;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class Container>
|
||||
struct is_contiguous_container
|
||||
|
|
@ -40,7 +40,7 @@ struct is_contiguous_container
|
|||
has_member_function_callable_with_data<const Container>::value;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class ForwardIterator, class Pred>
|
||||
bool is_sorted (ForwardIterator first, ForwardIterator last, Pred pred)
|
||||
|
|
@ -50,7 +50,7 @@ bool is_sorted_and_unique (ForwardIterator first, ForwardIterator last, Pred pre
|
|||
return true;
|
||||
}
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/iterator.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
|
|
@ -34,6 +35,35 @@ using ::boost::intrusive::iterator_enable_if_tag;
|
|||
using ::boost::intrusive::iterator_disable_if_tag;
|
||||
using ::boost::intrusive::iterator_arrow_result;
|
||||
|
||||
template <class Container>
|
||||
class back_emplacer
|
||||
{
|
||||
private:
|
||||
Container& container;
|
||||
|
||||
public:
|
||||
typedef std::output_iterator_tag iterator_category;
|
||||
typedef void value_type;
|
||||
typedef void difference_type;
|
||||
typedef void pointer;
|
||||
typedef void reference;
|
||||
|
||||
back_emplacer(Container& x)
|
||||
: container(x)
|
||||
{}
|
||||
|
||||
template<class U>
|
||||
back_emplacer& operator=(BOOST_FWD_REF(U) value)
|
||||
{
|
||||
container.emplace_back(boost::forward<U>(value));
|
||||
return *this;
|
||||
}
|
||||
back_emplacer& operator*() { return *this; }
|
||||
back_emplacer& operator++() { return *this; }
|
||||
back_emplacer& operator++(int){ return *this; }
|
||||
};
|
||||
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/iterator.hpp>
|
||||
#include <boost/container/detail/to_raw_pointer.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
template <class T>
|
||||
inline T* iterator_to_pointer(T* i)
|
||||
{ return i; }
|
||||
|
||||
template <class Iterator>
|
||||
inline typename boost::container::iterator_traits<Iterator>::pointer
|
||||
iterator_to_pointer(const Iterator &i)
|
||||
{ return i.operator->(); }
|
||||
|
||||
template <class Iterator>
|
||||
struct iterator_to_element_ptr
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<Iterator>::pointer pointer;
|
||||
typedef typename boost::intrusive::pointer_traits<pointer>::element_type element_type;
|
||||
typedef element_type* type;
|
||||
};
|
||||
|
||||
template <class Iterator>
|
||||
inline typename iterator_to_element_ptr<Iterator>::type
|
||||
iterator_to_raw_pointer(const Iterator &i)
|
||||
{
|
||||
return ::boost::intrusive::detail::to_raw_pointer
|
||||
( ::boost::container::container_detail::iterator_to_pointer(i) );
|
||||
}
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
|
|
@ -612,7 +612,7 @@ class emplace_iterator
|
|||
template<class ...Args>
|
||||
struct emplace_functor
|
||||
{
|
||||
typedef typename container_detail::build_number_seq<sizeof...(Args)>::type index_tuple_t;
|
||||
typedef typename dtl::build_number_seq<sizeof...(Args)>::type index_tuple_t;
|
||||
|
||||
emplace_functor(BOOST_FWD_REF(Args)... args)
|
||||
: args_(args...)
|
||||
|
|
@ -628,21 +628,21 @@ struct emplace_functor
|
|||
|
||||
private:
|
||||
template<class Allocator, class T, std::size_t ...IdxPack>
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const container_detail::index_tuple<IdxPack...>&)
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple<IdxPack...>&)
|
||||
{
|
||||
allocator_traits<Allocator>::construct
|
||||
(a, ptr, ::boost::forward<Args>(container_detail::get<IdxPack>(args_))...);
|
||||
(a, ptr, ::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
|
||||
}
|
||||
|
||||
template<class DestIt, std::size_t ...IdxPack>
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const container_detail::index_tuple<IdxPack...>&)
|
||||
BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const dtl::index_tuple<IdxPack...>&)
|
||||
{
|
||||
typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;
|
||||
value_type && tmp= value_type(::boost::forward<Args>(container_detail::get<IdxPack>(args_))...);
|
||||
value_type && tmp= value_type(::boost::forward<Args>(dtl::get<IdxPack>(args_))...);
|
||||
*dest = ::boost::move(tmp);
|
||||
}
|
||||
|
||||
container_detail::tuple<Args&...> args_;
|
||||
dtl::tuple<Args&...> args_;
|
||||
};
|
||||
|
||||
template<class ...Args>
|
||||
|
|
@ -672,7 +672,7 @@ struct emplace_functor##N\
|
|||
void operator()(DestIt dest)\
|
||||
{\
|
||||
typedef typename boost::container::iterator_traits<DestIt>::value_type value_type;\
|
||||
BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), container_detail::value_init<value_type> tmp) ;\
|
||||
BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), dtl::value_init<value_type> tmp) ;\
|
||||
*dest = ::boost::move(const_cast<value_type &>(BOOST_MOVE_IF(N, tmp, tmp.get())));\
|
||||
}\
|
||||
\
|
||||
|
|
@ -692,7 +692,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE)
|
|||
|
||||
#endif
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class T>
|
||||
struct has_iterator_category
|
||||
|
|
@ -863,7 +863,7 @@ class iterator_from_iiterator
|
|||
IIterator m_iit;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
using ::boost::intrusive::reverse_iterator;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class T>
|
||||
const T &max_value(const T &a, const T &b)
|
||||
|
|
@ -30,7 +30,7 @@ template<class T>
|
|||
const T &min_value(const T &a, const T &b)
|
||||
{ return a < b ? a : b; }
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
using boost::move_detail::integral_constant;
|
||||
using boost::move_detail::true_type;
|
||||
|
|
@ -76,7 +76,25 @@ struct select1st
|
|||
{ return const_cast<type&>(x.first); }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
template <class T, class=void>
|
||||
struct is_transparent
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_transparent<T, typename T::is_transparent>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template <typename C, typename K, typename R>
|
||||
struct enable_if_transparent
|
||||
: boost::move_detail::enable_if_c<dtl::is_transparent<C>::value, R>
|
||||
{};
|
||||
|
||||
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class VoidPointer>
|
||||
class basic_multiallocation_chain
|
||||
|
|
@ -53,7 +53,7 @@ class basic_multiallocation_chain
|
|||
typedef bi::slist< node
|
||||
, bi::linear<true>
|
||||
, bi::cache_last<true>
|
||||
, bi::size_type<typename boost::container::container_detail::make_unsigned<difference_type>::type>
|
||||
, bi::size_type<typename boost::container::dtl::make_unsigned<difference_type>::type>
|
||||
> slist_impl_t;
|
||||
slist_impl_t slist_impl_;
|
||||
|
||||
|
|
@ -182,7 +182,7 @@ class basic_multiallocation_chain
|
|||
template<class T>
|
||||
struct cast_functor
|
||||
{
|
||||
typedef typename container_detail::add_reference<T>::type result_type;
|
||||
typedef typename dtl::add_reference<T>::type result_type;
|
||||
template<class U>
|
||||
result_type operator()(U &ptr) const
|
||||
{ return *static_cast<T*>(static_cast<void*>(&ptr)); }
|
||||
|
|
@ -211,7 +211,7 @@ class transform_multiallocation_chain
|
|||
public:
|
||||
typedef transform_iterator
|
||||
< typename MultiallocationChain::iterator
|
||||
, container_detail::cast_functor <T> > iterator;
|
||||
, dtl::cast_functor <T> > iterator;
|
||||
typedef typename MultiallocationChain::size_type size_type;
|
||||
|
||||
transform_multiallocation_chain()
|
||||
|
|
@ -289,7 +289,7 @@ class transform_multiallocation_chain
|
|||
|
||||
}}}
|
||||
|
||||
// namespace container_detail {
|
||||
// namespace dtl {
|
||||
// namespace container {
|
||||
// namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -23,52 +23,54 @@
|
|||
// container/detail
|
||||
#include <boost/container/detail/min_max.hpp>
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
enum NextCapacityOption { NextCapacityDouble, NextCapacity60Percent };
|
||||
|
||||
template<class SizeType, NextCapacityOption Option>
|
||||
struct next_capacity_calculator;
|
||||
|
||||
template<class SizeType>
|
||||
struct next_capacity_calculator<SizeType, NextCapacityDouble>
|
||||
template<unsigned Minimum, unsigned Numerator, unsigned Denominator>
|
||||
struct grow_factor_ratio
|
||||
{
|
||||
static SizeType get(const SizeType max_size
|
||||
,const SizeType capacity
|
||||
,const SizeType n)
|
||||
BOOST_STATIC_ASSERT(Numerator > Denominator);
|
||||
BOOST_STATIC_ASSERT(Numerator < 100);
|
||||
BOOST_STATIC_ASSERT(Denominator < 100);
|
||||
BOOST_STATIC_ASSERT(Denominator == 1 || (0 != Numerator % Denominator));
|
||||
|
||||
template<class SizeType>
|
||||
SizeType operator()(const SizeType cur_cap, const SizeType add_min_cap, const SizeType max_cap) const
|
||||
{
|
||||
const SizeType remaining = max_size - capacity;
|
||||
if ( remaining < n )
|
||||
boost::container::throw_length_error("get_next_capacity, allocator's max_size reached");
|
||||
const SizeType additional = max_value(n, capacity);
|
||||
return ( remaining < additional ) ? max_size : ( capacity + additional );
|
||||
const SizeType overflow_limit = ((SizeType)-1) / Numerator;
|
||||
|
||||
SizeType new_cap = 0;
|
||||
|
||||
if(cur_cap <= overflow_limit){
|
||||
new_cap = cur_cap * Numerator / Denominator;
|
||||
}
|
||||
else if(Denominator == 1 || (SizeType(new_cap = cur_cap) / Denominator) > overflow_limit){
|
||||
new_cap = (SizeType)-1;
|
||||
}
|
||||
else{
|
||||
new_cap *= Numerator;
|
||||
}
|
||||
return max_value(SizeType(Minimum), max_value(cur_cap+add_min_cap, min_value(max_cap, new_cap)));
|
||||
}
|
||||
};
|
||||
|
||||
template<class SizeType>
|
||||
struct next_capacity_calculator<SizeType, NextCapacity60Percent>
|
||||
{
|
||||
static SizeType get(const SizeType max_size
|
||||
,const SizeType capacity
|
||||
,const SizeType n)
|
||||
{
|
||||
const SizeType remaining = max_size - capacity;
|
||||
if ( remaining < n )
|
||||
boost::container::throw_length_error("get_next_capacity, allocator's max_size reached");
|
||||
const SizeType m3 = max_size/3;
|
||||
} //namespace dtl {
|
||||
|
||||
if (capacity < m3)
|
||||
return capacity + max_value(3*(capacity+1)/5, n);
|
||||
struct growth_factor_50
|
||||
: dtl::grow_factor_ratio<0, 3, 2>
|
||||
{};
|
||||
|
||||
if (capacity < m3*2)
|
||||
return capacity + max_value((capacity+1)/2, n);
|
||||
return max_size;
|
||||
}
|
||||
};
|
||||
struct growth_factor_60
|
||||
: dtl::grow_factor_ratio<0, 8, 5>
|
||||
{};
|
||||
|
||||
struct growth_factor_100
|
||||
: dtl::grow_factor_ratio<0, 2, 1>
|
||||
{};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_compare)
|
||||
BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(predicate_type)
|
||||
|
|
@ -61,14 +61,14 @@ struct node_alloc_holder
|
|||
//If the intrusive container is an associative container, obtain the predicate, which will
|
||||
//be of type node_compare<>. If not an associative container value_compare will be a "nat" type.
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
|
||||
( boost::container::container_detail::
|
||||
, ICont, value_compare, container_detail::nat) intrusive_value_compare;
|
||||
( boost::container::dtl::
|
||||
, ICont, value_compare, dtl::nat) intrusive_value_compare;
|
||||
//In that case obtain the value predicate from the node predicate via predicate_type
|
||||
//if intrusive_value_compare is node_compare<>, nat otherwise
|
||||
typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
|
||||
( boost::container::container_detail::
|
||||
( boost::container::dtl::
|
||||
, intrusive_value_compare
|
||||
, predicate_type, container_detail::nat) value_compare;
|
||||
, predicate_type, dtl::nat) value_compare;
|
||||
|
||||
typedef allocator_traits<Allocator> allocator_traits_type;
|
||||
typedef typename allocator_traits_type::value_type value_type;
|
||||
|
|
@ -77,14 +77,14 @@ struct node_alloc_holder
|
|||
typedef typename allocator_traits_type::template
|
||||
portable_rebind_alloc<Node>::type NodeAlloc;
|
||||
typedef allocator_traits<NodeAlloc> node_allocator_traits_type;
|
||||
typedef container_detail::allocator_version_traits<NodeAlloc> node_allocator_version_traits_type;
|
||||
typedef dtl::allocator_version_traits<NodeAlloc> node_allocator_version_traits_type;
|
||||
typedef Allocator ValAlloc;
|
||||
typedef typename node_allocator_traits_type::pointer NodePtr;
|
||||
typedef container_detail::scoped_deallocator<NodeAlloc> Deallocator;
|
||||
typedef dtl::scoped_deallocator<NodeAlloc> Deallocator;
|
||||
typedef typename node_allocator_traits_type::size_type size_type;
|
||||
typedef typename node_allocator_traits_type::difference_type difference_type;
|
||||
typedef container_detail::integral_constant<unsigned,
|
||||
boost::container::container_detail::
|
||||
typedef dtl::integral_constant<unsigned,
|
||||
boost::container::dtl::
|
||||
version<NodeAlloc>::value> alloc_version;
|
||||
typedef typename ICont::iterator icont_iterator;
|
||||
typedef typename ICont::const_iterator icont_citerator;
|
||||
|
|
@ -134,15 +134,15 @@ struct node_alloc_holder
|
|||
|
||||
void copy_assign_alloc(const node_alloc_holder &x)
|
||||
{
|
||||
container_detail::bool_<allocator_traits_type::propagate_on_container_copy_assignment::value> flag;
|
||||
container_detail::assign_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
dtl::bool_<allocator_traits_type::propagate_on_container_copy_assignment::value> flag;
|
||||
dtl::assign_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
, static_cast<const NodeAlloc &>(x.members_), flag);
|
||||
}
|
||||
|
||||
void move_assign_alloc( node_alloc_holder &x)
|
||||
{
|
||||
container_detail::bool_<allocator_traits_type::propagate_on_container_move_assignment::value> flag;
|
||||
container_detail::move_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
dtl::bool_<allocator_traits_type::propagate_on_container_move_assignment::value> flag;
|
||||
dtl::move_alloc( static_cast<NodeAlloc &>(this->members_)
|
||||
, static_cast<NodeAlloc &>(x.members_), flag);
|
||||
}
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ struct node_alloc_holder
|
|||
Deallocator node_deallocator(p, this->node_alloc());
|
||||
allocator_traits<NodeAlloc>::construct
|
||||
( this->node_alloc()
|
||||
, container_detail::addressof(p->m_data), boost::forward<Args>(args)...);
|
||||
, dtl::addressof(p->m_data), boost::forward<Args>(args)...);
|
||||
node_deallocator.release();
|
||||
//This does not throw
|
||||
typedef typename Node::hook_type hook_type;
|
||||
|
|
@ -185,7 +185,7 @@ struct node_alloc_holder
|
|||
Deallocator node_deallocator(p, this->node_alloc());\
|
||||
allocator_traits<NodeAlloc>::construct\
|
||||
( this->node_alloc()\
|
||||
, container_detail::addressof(p->m_data)\
|
||||
, dtl::addressof(p->m_data)\
|
||||
BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
||||
node_deallocator.release();\
|
||||
typedef typename Node::hook_type hook_type;\
|
||||
|
|
@ -203,7 +203,7 @@ struct node_alloc_holder
|
|||
{
|
||||
NodePtr p = this->allocate_one();
|
||||
Deallocator node_deallocator(p, this->node_alloc());
|
||||
::boost::container::construct_in_place(this->node_alloc(), container_detail::addressof(p->m_data), it);
|
||||
::boost::container::construct_in_place(this->node_alloc(), dtl::addressof(p->m_data), it);
|
||||
node_deallocator.release();
|
||||
//This does not throw
|
||||
typedef typename Node::hook_type hook_type;
|
||||
|
|
@ -218,12 +218,12 @@ struct node_alloc_holder
|
|||
NodeAlloc &na = this->node_alloc();
|
||||
Deallocator node_deallocator(p, this->node_alloc());
|
||||
node_allocator_traits_type::construct
|
||||
(na, container_detail::addressof(p->m_data.first), boost::forward<KeyConvertible>(key));
|
||||
(na, dtl::addressof(p->m_data.first), boost::forward<KeyConvertible>(key));
|
||||
BOOST_TRY{
|
||||
node_allocator_traits_type::construct(na, container_detail::addressof(p->m_data.second));
|
||||
node_allocator_traits_type::construct(na, dtl::addressof(p->m_data.second));
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
node_allocator_traits_type::destroy(na, container_detail::addressof(p->m_data.first));
|
||||
node_allocator_traits_type::destroy(na, dtl::addressof(p->m_data.first));
|
||||
BOOST_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
|
|
@ -243,8 +243,8 @@ struct node_alloc_holder
|
|||
void swap(node_alloc_holder &x)
|
||||
{
|
||||
this->icont().swap(x.icont());
|
||||
container_detail::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
||||
container_detail::swap_alloc(this->node_alloc(), x.node_alloc(), flag);
|
||||
dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
|
||||
dtl::swap_alloc(this->node_alloc(), x.node_alloc(), flag);
|
||||
}
|
||||
|
||||
template<class FwdIterator, class Inserter>
|
||||
|
|
@ -264,13 +264,13 @@ struct node_alloc_holder
|
|||
Node *p = 0;
|
||||
BOOST_TRY{
|
||||
Deallocator node_deallocator(NodePtr(), nalloc);
|
||||
container_detail::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0);
|
||||
dtl::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0);
|
||||
while(n--){
|
||||
p = boost::movelib::iterator_to_raw_pointer(itbeg);
|
||||
node_deallocator.set(p);
|
||||
++itbeg;
|
||||
//This can throw
|
||||
boost::container::construct_in_place(nalloc, container_detail::addressof(p->m_data), beg);
|
||||
boost::container::construct_in_place(nalloc, dtl::addressof(p->m_data), beg);
|
||||
sdestructor.set(p);
|
||||
++beg;
|
||||
//This does not throw
|
||||
|
|
@ -410,7 +410,7 @@ struct node_alloc_holder
|
|||
{ return this->members_.m_icont; }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ struct is_boost_tuple< boost::tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8,
|
|||
|
||||
template<class Tuple>
|
||||
struct disable_if_boost_tuple
|
||||
: boost::container::container_detail::disable_if< is_boost_tuple<Tuple> >
|
||||
: boost::container::dtl::disable_if< is_boost_tuple<Tuple> >
|
||||
{};
|
||||
|
||||
template<class T>
|
||||
|
|
@ -133,7 +133,7 @@ static piecewise_construct_t piecewise_construct = BOOST_CONTAINER_DOC1ST(unspec
|
|||
|
||||
///@cond
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
struct piecewise_construct_use
|
||||
{
|
||||
|
|
@ -283,7 +283,7 @@ struct pair
|
|||
pair( piecewise_construct_t\
|
||||
, BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> p\
|
||||
, BoostTuple<BOOST_MOVE_TARGQ##M BOOST_MOVE_I##M BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,M),::boost::tuples::null_type)> q\
|
||||
, typename container_detail::enable_if_c\
|
||||
, typename dtl::enable_if_c\
|
||||
< pair_impl::is_boost_tuple< BoostTuple<BOOST_MOVE_TARG##N BOOST_MOVE_I##N BOOST_MOVE_REPEAT(BOOST_MOVE_SUB(10,N),::boost::tuples::null_type)> >::value &&\
|
||||
!(pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARG##N>::value || pair_impl::is_tuple_null<BOOST_MOVE_LAST_TARGQ##M>::value) \
|
||||
>::type* = 0\
|
||||
|
|
@ -381,10 +381,10 @@ struct pair
|
|||
}
|
||||
|
||||
template <class D, class S>
|
||||
typename ::boost::container::container_detail::disable_if_or
|
||||
typename ::boost::container::dtl::disable_if_or
|
||||
< pair &
|
||||
, ::boost::container::container_detail::is_same<T1, D>
|
||||
, ::boost::container::container_detail::is_same<T2, S>
|
||||
, ::boost::container::dtl::is_same<T1, D>
|
||||
, ::boost::container::dtl::is_same<T2, S>
|
||||
>::type
|
||||
operator=(const pair<D, S>&p)
|
||||
{
|
||||
|
|
@ -394,10 +394,10 @@ struct pair
|
|||
}
|
||||
|
||||
template <class D, class S>
|
||||
typename ::boost::container::container_detail::disable_if_or
|
||||
typename ::boost::container::dtl::disable_if_or
|
||||
< pair &
|
||||
, ::boost::container::container_detail::is_same<T1, D>
|
||||
, ::boost::container::container_detail::is_same<T2, S>
|
||||
, ::boost::container::dtl::is_same<T1, D>
|
||||
, ::boost::container::dtl::is_same<T2, S>
|
||||
>::type
|
||||
operator=(BOOST_RV_REF_BEG pair<D, S> BOOST_RV_REF_END p)
|
||||
{
|
||||
|
|
@ -478,13 +478,13 @@ template <class T1, class T2>
|
|||
inline void swap(pair<T1, T2>& x, pair<T1, T2>& y)
|
||||
{ x.swap(y); }
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template<class T1, class T2>
|
||||
struct has_move_emulation_enabled< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct has_move_emulation_enabled< ::boost::container::dtl::pair<T1, T2> >
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
|
@ -497,7 +497,7 @@ template<class T>
|
|||
struct is_class_or_union;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_class_or_union< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct is_class_or_union< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
|
|
@ -516,7 +516,7 @@ template<class T>
|
|||
struct is_union;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_union< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct is_union< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
|
|
@ -535,7 +535,7 @@ template<class T>
|
|||
struct is_class;
|
||||
|
||||
template <class T1, class T2>
|
||||
struct is_class< ::boost::container::container_detail::pair<T1, T2> >
|
||||
struct is_class< ::boost::container::dtl::pair<T1, T2> >
|
||||
//This specialization is needed to avoid instantiation of pair in
|
||||
//is_class, and allow recursive maps.
|
||||
{
|
||||
|
|
@ -550,6 +550,61 @@ struct is_class< std::pair<T1, T2> >
|
|||
static const bool value = true;
|
||||
};
|
||||
|
||||
|
||||
//Triviality of pair
|
||||
template<class T>
|
||||
struct is_trivially_copy_constructible;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_copy_assignable
|
||||
<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_copy_assignable<A>::value &&
|
||||
boost::move_detail::is_trivially_copy_assignable<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_move_constructible;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_move_assignable
|
||||
<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_move_assignable<A>::value &&
|
||||
boost::move_detail::is_trivially_move_assignable<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_copy_assignable;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_copy_constructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_copy_constructible<A>::value &&
|
||||
boost::move_detail::is_trivially_copy_constructible<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_move_assignable;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_move_constructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_move_constructible<A>::value &&
|
||||
boost::move_detail::is_trivially_move_constructible<B>::value ;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_destructible;
|
||||
|
||||
template<class A, class B>
|
||||
struct is_trivially_destructible<boost::container::dtl::pair<A,B> >
|
||||
{
|
||||
static const bool value = boost::move_detail::is_trivially_destructible<A>::value &&
|
||||
boost::move_detail::is_trivially_destructible<B>::value ;
|
||||
};
|
||||
|
||||
|
||||
} //namespace move_detail{
|
||||
|
||||
} //namespace boost {
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_CONTAINER_DETAIL_TO_RAW_POINTER_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_TO_RAW_POINTER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/to_raw_pointer.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
using ::boost::intrusive::detail::to_raw_pointer;
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_TO_RAW_POINTER_HPP
|
||||
|
|
@ -63,7 +63,7 @@ class transform_iterator
|
|||
: public UnaryFunction
|
||||
, public boost::container::iterator
|
||||
< typename Iterator::iterator_category
|
||||
, typename container_detail::remove_reference<typename UnaryFunction::result_type>::type
|
||||
, typename dtl::remove_reference<typename UnaryFunction::result_type>::type
|
||||
, typename Iterator::difference_type
|
||||
, operator_arrow_proxy<typename UnaryFunction::result_type>
|
||||
, typename UnaryFunction::result_type>
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
using boost::intrusive::tree_value_compare;
|
||||
|
||||
|
|
@ -71,38 +71,38 @@ struct intrusive_tree_hook;
|
|||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::red_black_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
, container_detail::bi::optimize_size<OptimizeSize>
|
||||
typedef typename dtl::bi::make_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
, dtl::bi::optimize_size<OptimizeSize>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::avl_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_avl_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
, container_detail::bi::optimize_size<OptimizeSize>
|
||||
typedef typename dtl::bi::make_avl_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
, dtl::bi::optimize_size<OptimizeSize>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::scapegoat_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_bs_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
typedef typename dtl::bi::make_bs_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template<class VoidPointer, bool OptimizeSize>
|
||||
struct intrusive_tree_hook<VoidPointer, boost::container::splay_tree, OptimizeSize>
|
||||
{
|
||||
typedef typename container_detail::bi::make_bs_set_base_hook
|
||||
< container_detail::bi::void_pointer<VoidPointer>
|
||||
, container_detail::bi::link_mode<container_detail::bi::normal_link>
|
||||
typedef typename dtl::bi::make_bs_set_base_hook
|
||||
< dtl::bi::void_pointer<VoidPointer>
|
||||
, dtl::bi::link_mode<dtl::bi::normal_link>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
|
@ -222,9 +222,9 @@ class push_back_functor
|
|||
{ this->icont_.push_back(n); }
|
||||
};
|
||||
|
||||
}//namespace container_detail {
|
||||
}//namespace dtl {
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template< class NodeType, class NodeCompareType
|
||||
, class SizeType, class HookType
|
||||
|
|
@ -235,12 +235,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::red_black_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_rbtree
|
||||
typedef typename dtl::bi::make_rbtree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::constant_time_size<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::constant_time_size<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
|
@ -248,12 +248,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::avl_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_avltree
|
||||
typedef typename dtl::bi::make_avltree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::constant_time_size<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::constant_time_size<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
|
@ -261,12 +261,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::scapegoat_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_sgtree
|
||||
typedef typename dtl::bi::make_sgtree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::floating_point<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::floating_point<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
|
@ -274,12 +274,12 @@ template<class NodeType, class NodeCompareType, class SizeType, class HookType>
|
|||
struct intrusive_tree_dispatch
|
||||
<NodeType, NodeCompareType, SizeType, HookType, boost::container::splay_tree>
|
||||
{
|
||||
typedef typename container_detail::bi::make_splaytree
|
||||
typedef typename dtl::bi::make_splaytree
|
||||
<NodeType
|
||||
,container_detail::bi::compare<NodeCompareType>
|
||||
,container_detail::bi::base_hook<HookType>
|
||||
,container_detail::bi::constant_time_size<true>
|
||||
,container_detail::bi::size_type<SizeType>
|
||||
,dtl::bi::compare<NodeCompareType>
|
||||
,dtl::bi::base_hook<HookType>
|
||||
,dtl::bi::constant_time_size<true>
|
||||
,dtl::bi::size_type<SizeType>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
|
@ -293,7 +293,7 @@ struct intrusive_tree_type
|
|||
allocator_traits<Allocator>::void_pointer void_pointer;
|
||||
typedef typename boost::container::
|
||||
allocator_traits<Allocator>::size_type size_type;
|
||||
typedef typename container_detail::tree_node
|
||||
typedef typename dtl::tree_node
|
||||
< value_type, void_pointer
|
||||
, tree_type_value, OptimizeSize> node_t;
|
||||
typedef value_to_node_compare
|
||||
|
|
@ -340,9 +340,9 @@ struct intrusive_tree_proxy<tree_type_value, true>
|
|||
{ c.rebalance(); }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
//This functor will be used with Intrusive clone functions to obtain
|
||||
//already allocated nodes from a intrusive container instead of
|
||||
|
|
@ -394,6 +394,7 @@ class RecyclingCloner
|
|||
intrusive_container &m_icont;
|
||||
};
|
||||
|
||||
|
||||
template<class KeyCompare, class KeyOfValue>
|
||||
struct key_node_compare
|
||||
: public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
|
||||
|
|
@ -407,6 +408,21 @@ struct key_node_compare
|
|||
typedef KeyOfValue key_of_value;
|
||||
typedef typename KeyOfValue::type key_type;
|
||||
|
||||
|
||||
template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
|
||||
BOOST_CONTAINER_FORCEINLINE static const key_type &
|
||||
key_from(const tree_node<T, VoidPointer, tree_type_value, OptimizeSize> &n)
|
||||
{
|
||||
return key_of_value()(n.get_data());
|
||||
}
|
||||
|
||||
template <class T>
|
||||
BOOST_CONTAINER_FORCEINLINE static const T &
|
||||
key_from(const T &t)
|
||||
{
|
||||
return t;
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const key_compare &key_comp() const
|
||||
{ return static_cast<const key_compare &>(*this); }
|
||||
|
||||
|
|
@ -418,36 +434,51 @@ struct key_node_compare
|
|||
|
||||
template<class U>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
|
||||
{ return this->key_comp()(key1, key_of_value()(nonkey2.get_data())); }
|
||||
{ return this->key_comp()(key1, this->key_from(nonkey2)); }
|
||||
|
||||
template<class U>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
|
||||
{ return this->key_comp()(key_of_value()(nonkey1.get_data()), key2); }
|
||||
{ return this->key_comp()(this->key_from(nonkey1), key2); }
|
||||
|
||||
template<class U, class V>
|
||||
BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
|
||||
{ return this->key_comp()(key_of_value()(nonkey1.get_data()), key_of_value()(nonkey2.get_data())); }
|
||||
{ return this->key_comp()(this->key_from(nonkey1), this->key_from(nonkey2)); }
|
||||
};
|
||||
|
||||
template <class T, class KeyOfValue,
|
||||
class Compare, class Allocator,
|
||||
class Options = tree_assoc_defaults>
|
||||
template<class Options>
|
||||
struct get_tree_opt
|
||||
{
|
||||
typedef Options type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct get_tree_opt<void>
|
||||
{
|
||||
typedef tree_assoc_defaults type;
|
||||
};
|
||||
|
||||
template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
|
||||
class tree
|
||||
: public container_detail::node_alloc_holder
|
||||
: public dtl::node_alloc_holder
|
||||
< Allocator
|
||||
, typename container_detail::intrusive_tree_type
|
||||
, typename dtl::intrusive_tree_type
|
||||
< Allocator, tree_value_compare
|
||||
<typename allocator_traits<Allocator>::pointer, Compare, KeyOfValue>
|
||||
, Options::tree_type, Options::optimize_size>::type
|
||||
, get_tree_opt<Options>::type::tree_type
|
||||
, get_tree_opt<Options>::type::optimize_size
|
||||
>::type
|
||||
>
|
||||
{
|
||||
typedef tree_value_compare
|
||||
< typename allocator_traits<Allocator>::pointer
|
||||
, Compare, KeyOfValue> ValComp;
|
||||
typedef typename container_detail::intrusive_tree_type
|
||||
< Allocator, ValComp, Options::tree_type
|
||||
, Options::optimize_size>::type Icont;
|
||||
typedef container_detail::node_alloc_holder
|
||||
typedef typename get_tree_opt<Options>::type options_type;
|
||||
typedef typename dtl::intrusive_tree_type
|
||||
< Allocator, ValComp
|
||||
, options_type::tree_type
|
||||
, options_type::optimize_size
|
||||
>::type Icont;
|
||||
typedef dtl::node_alloc_holder
|
||||
<Allocator, Icont> AllocHolder;
|
||||
typedef typename AllocHolder::NodePtr NodePtr;
|
||||
typedef tree < T, KeyOfValue
|
||||
|
|
@ -459,9 +490,9 @@ class tree
|
|||
typedef typename AllocHolder::Node Node;
|
||||
typedef typename Icont::iterator iiterator;
|
||||
typedef typename Icont::const_iterator iconst_iterator;
|
||||
typedef container_detail::allocator_destroyer<NodeAlloc> Destroyer;
|
||||
typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
|
||||
typedef typename AllocHolder::alloc_version alloc_version;
|
||||
typedef intrusive_tree_proxy<Options::tree_type> intrusive_tree_proxy_t;
|
||||
typedef intrusive_tree_proxy<options_type::tree_type> intrusive_tree_proxy_t;
|
||||
|
||||
BOOST_COPYABLE_AND_MOVABLE(tree)
|
||||
|
||||
|
|
@ -484,9 +515,9 @@ class tree
|
|||
allocator_traits<Allocator>::size_type size_type;
|
||||
typedef typename boost::container::
|
||||
allocator_traits<Allocator>::difference_type difference_type;
|
||||
typedef container_detail::iterator_from_iiterator
|
||||
typedef dtl::iterator_from_iiterator
|
||||
<iiterator, false> iterator;
|
||||
typedef container_detail::iterator_from_iiterator
|
||||
typedef dtl::iterator_from_iiterator
|
||||
<iiterator, true > const_iterator;
|
||||
typedef boost::container::reverse_iterator
|
||||
<iterator> reverse_iterator;
|
||||
|
|
@ -590,10 +621,10 @@ class tree
|
|||
template <class InputIterator>
|
||||
void tree_construct_non_unique(InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::enable_if_or
|
||||
, typename dtl::enable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
|
@ -610,10 +641,10 @@ class tree
|
|||
template <class InputIterator>
|
||||
void tree_construct_non_unique(InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::disable_if_or
|
||||
, typename dtl::disable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
|
@ -627,10 +658,10 @@ class tree
|
|||
template <class InputIterator>
|
||||
void tree_construct( ordered_range_t, InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::disable_if_or
|
||||
, typename dtl::disable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
|
@ -638,17 +669,17 @@ class tree
|
|||
//Optimized allocation and construction
|
||||
this->allocate_many_and_construct
|
||||
( first, boost::container::iterator_distance(first, last)
|
||||
, container_detail::push_back_functor<Node, Icont>(this->icont()));
|
||||
, dtl::push_back_functor<Node, Icont>(this->icont()));
|
||||
//AllocHolder clears in case of exception
|
||||
}
|
||||
|
||||
template <class InputIterator>
|
||||
void tree_construct( ordered_range_t, InputIterator first, InputIterator last
|
||||
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
||||
, typename container_detail::enable_if_or
|
||||
, typename dtl::enable_if_or
|
||||
< void
|
||||
, container_detail::is_same<alloc_version, version_1>
|
||||
, container_detail::is_input_iterator<InputIterator>
|
||||
, dtl::is_same<alloc_version, version_1>
|
||||
, dtl::is_input_iterator<InputIterator>
|
||||
>::type * = 0
|
||||
#endif
|
||||
)
|
||||
|
|
@ -668,7 +699,7 @@ class tree
|
|||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x)
|
||||
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
||||
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
|
||||
: AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp())
|
||||
{}
|
||||
|
||||
|
|
@ -701,7 +732,7 @@ class tree
|
|||
if (&x != this){
|
||||
NodeAlloc &this_alloc = this->get_stored_allocator();
|
||||
const NodeAlloc &x_alloc = x.get_stored_allocator();
|
||||
container_detail::bool_<allocator_traits<NodeAlloc>::
|
||||
dtl::bool_<allocator_traits<NodeAlloc>::
|
||||
propagate_on_container_copy_assignment::value> flag;
|
||||
if(flag && this_alloc != x_alloc){
|
||||
this->clear();
|
||||
|
|
@ -730,7 +761,7 @@ class tree
|
|||
tree& operator=(BOOST_RV_REF(tree) x)
|
||||
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
||||
allocator_traits_type::is_always_equal::value) &&
|
||||
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
||||
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
|
||||
{
|
||||
BOOST_ASSERT(this != &x);
|
||||
NodeAlloc &this_alloc = this->node_alloc();
|
||||
|
|
@ -856,7 +887,7 @@ class tree
|
|||
|
||||
BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x)
|
||||
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|
||||
&& boost::container::container_detail::is_nothrow_swappable<Compare>::value )
|
||||
&& boost::container::dtl::is_nothrow_swappable<Compare>::value )
|
||||
{ AllocHolder::swap(x); }
|
||||
|
||||
public:
|
||||
|
|
@ -1245,21 +1276,63 @@ class tree
|
|||
BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
find(const K& k)
|
||||
{ return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
find(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& k) const
|
||||
{ return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, size_type>::type
|
||||
count(const K& k) const
|
||||
{ return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
|
||||
{ return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
lower_bound(const K& k)
|
||||
{ return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
lower_bound(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
|
||||
{ return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
|
||||
{ return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
|
||||
upper_bound(const K& k)
|
||||
{ return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
|
||||
upper_bound(const K& k) const
|
||||
{ return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
|
||||
|
||||
std::pair<iterator,iterator> equal_range(const key_type& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
|
|
@ -1275,6 +1348,27 @@ class tree
|
|||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
|
||||
equal_range(const K& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->icont().equal_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
|
||||
equal_range(const K& k) const
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<const_iterator,const_iterator>
|
||||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
std::pair<iterator,iterator> lower_bound_range(const key_type& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
|
|
@ -1290,6 +1384,27 @@ class tree
|
|||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
|
||||
lower_bound_range(const K& k)
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
|
||||
}
|
||||
|
||||
template <class K>
|
||||
BOOST_CONTAINER_FORCEINLINE
|
||||
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
|
||||
lower_bound_range(const K& k) const
|
||||
{
|
||||
std::pair<iiterator, iiterator> ret =
|
||||
this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
|
||||
return std::pair<const_iterator,const_iterator>
|
||||
(const_iterator(ret.first), const_iterator(ret.second));
|
||||
}
|
||||
|
||||
BOOST_CONTAINER_FORCEINLINE void rebalance()
|
||||
{ intrusive_tree_proxy_t::rebalance(this->icont()); }
|
||||
|
||||
|
|
@ -1315,7 +1430,7 @@ class tree
|
|||
{ x.swap(y); }
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
|
||||
template <class T>
|
||||
|
|
@ -1326,7 +1441,7 @@ struct has_trivial_destructor_after_move;
|
|||
template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
|
||||
struct has_trivial_destructor_after_move
|
||||
<
|
||||
::boost::container::container_detail::tree
|
||||
::boost::container::dtl::tree
|
||||
<T, KeyOfValue, Compare, Allocator, Options>
|
||||
>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
using ::boost::move_detail::enable_if;
|
||||
using ::boost::move_detail::enable_if_and;
|
||||
|
|
@ -63,7 +63,7 @@ using ::boost::move_detail::aligned_storage;
|
|||
using ::boost::move_detail::nat;
|
||||
using ::boost::move_detail::max_align_t;
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
36
boost/container/detail/value_functors.hpp
Normal file
36
boost/container/detail/value_functors.hpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#ifndef BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2017-2017. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/container for documentation.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//Functors for member algorithm defaults
|
||||
template<class ValueType>
|
||||
struct value_less
|
||||
{
|
||||
bool operator()(const ValueType &a, const ValueType &b) const
|
||||
{ return a < b; }
|
||||
};
|
||||
|
||||
template<class ValueType>
|
||||
struct value_equal
|
||||
{
|
||||
bool operator()(const ValueType &a, const ValueType &b) const
|
||||
{ return a == b; }
|
||||
};
|
||||
|
||||
#endif //BOOST_CONTAINER_DETAIL_VALUE_FUNCTORS_HPP
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<class T>
|
||||
struct value_init
|
||||
|
|
@ -42,7 +42,7 @@ struct value_init
|
|||
T m_t;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template<typename... Values>
|
||||
class tuple;
|
||||
|
|
@ -78,7 +78,7 @@ class tuple<Head, Tail...>
|
|||
|
||||
|
||||
template<typename... Values>
|
||||
tuple<Values&&...> forward_as_tuple(Values&&... values)
|
||||
tuple<Values&&...> forward_as_tuple_impl(Values&&... values)
|
||||
{ return tuple<Values&&...>(::boost::forward<Values>(values)...); }
|
||||
|
||||
template<int I, typename Tuple>
|
||||
|
|
@ -156,7 +156,7 @@ struct build_number_seq
|
|||
template<> struct build_number_seq<0> : index_tuple<>{};
|
||||
template<> struct build_number_seq<1> : index_tuple<0>{};
|
||||
|
||||
}}} //namespace boost { namespace container { namespace container_detail {
|
||||
}}} //namespace boost { namespace container { namespace dtl {
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,11 +32,11 @@
|
|||
|
||||
namespace boost{
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
namespace dtl {
|
||||
|
||||
template <class T, unsigned V>
|
||||
struct version_type
|
||||
: public container_detail::integral_constant<unsigned, V>
|
||||
: public dtl::integral_constant<unsigned, V>
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ struct version_type
|
|||
namespace impl{
|
||||
|
||||
template <class T,
|
||||
bool = container_detail::is_convertible<version_type<T, 0>, typename T::version>::value>
|
||||
bool = dtl::is_convertible<version_type<T, 0>, typename T::version>::value>
|
||||
struct extract_version
|
||||
{
|
||||
static const unsigned value = 1;
|
||||
|
|
@ -86,7 +86,7 @@ struct version<T, true>
|
|||
|
||||
template <class T>
|
||||
struct version
|
||||
: public container_detail::integral_constant<unsigned, impl::version<T>::value>
|
||||
: public dtl::integral_constant<unsigned, impl::version<T>::value>
|
||||
{};
|
||||
|
||||
template<class T, unsigned N>
|
||||
|
|
@ -96,11 +96,11 @@ struct is_version
|
|||
is_same< typename version<T>::type, integral_constant<unsigned, N> >::value;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
} //namespace dtl {
|
||||
|
||||
typedef container_detail::integral_constant<unsigned, 0> version_0;
|
||||
typedef container_detail::integral_constant<unsigned, 1> version_1;
|
||||
typedef container_detail::integral_constant<unsigned, 2> version_2;
|
||||
typedef dtl::integral_constant<unsigned, 0> version_0;
|
||||
typedef dtl::integral_constant<unsigned, 1> version_1;
|
||||
typedef dtl::integral_constant<unsigned, 2> version_2;
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue