Don't use BOOST_CONTAINER_FORCEINLINE extensively, due to potential code bloat

This commit is contained in:
Ion Gaztañaga committed 2023-05-10 22:09:01 +02:00
1 parent 9c852071f9
commit 1a4a205ea6
32 files changed
+1966 -2001

No files matched your search

@@ -49,19 +49,19 @@ struct move_insert_range_proxy
{
typedef typename allocator_traits<Allocator>::value_type value_type;
BOOST_CONTAINER_FORCEINLINE explicit move_insert_range_proxy(FwdIt first)
inline explicit move_insert_range_proxy(FwdIt first)
: first_(first)
{}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
{
this->first_ = ::boost::container::uninitialized_move_alloc_n_source
(a, this->first_, n, p);
}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n)
inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n)
{
this->first_ = ::boost::container::move_n_source(this->first_, n, p);
}
@@ -75,18 +75,18 @@ struct insert_range_proxy
{
typedef typename allocator_traits<Allocator>::value_type value_type;
BOOST_CONTAINER_FORCEINLINE explicit insert_range_proxy(FwdIt first)
inline explicit insert_range_proxy(FwdIt first)
: first_(first)
{}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
{
this->first_ = ::boost::container::uninitialized_copy_alloc_n_source(a, this->first_, n, p);
}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n)
inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n)
{
this->first_ = ::boost::container::copy_n_source(this->first_, n, p);
}
@@ -100,16 +100,16 @@ struct insert_n_copies_proxy
{
typedef typename allocator_traits<Allocator>::value_type value_type;
BOOST_CONTAINER_FORCEINLINE explicit insert_n_copies_proxy(const value_type &v)
inline explicit insert_n_copies_proxy(const value_type &v)
: v_(v)
{}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
{ boost::container::uninitialized_fill_alloc_n(a, v_, n, p); }
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const
inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const
{
while (n){
--n;
@@ -129,7 +129,7 @@ struct insert_value_initialized_n_proxy
typedef typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type storage_t;
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
{ boost::container::uninitialized_value_init_alloc_n(a, n, p); }
template<class Iterator>
@@ -155,7 +155,7 @@ struct insert_default_initialized_n_proxy
typedef typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type storage_t;
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
{ boost::container::uninitialized_default_init_alloc_n(a, n, p); }
template<class Iterator>
@@ -183,19 +183,19 @@ struct insert_copy_proxy
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_copy_proxy(const value_type &v)
inline explicit insert_copy_proxy(const value_type &v)
: v_(v)
{}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
{
BOOST_ASSERT(n == 1); (void)n;
alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_);
}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const
inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const
{
BOOST_ASSERT(n == 1); (void)n;
*p = v_;
@@ -213,19 +213,19 @@ struct insert_move_proxy
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_move_proxy(value_type &v)
inline explicit insert_move_proxy(value_type &v)
: v_(v)
{}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n) const
{
BOOST_ASSERT(n == 1); (void)n;
alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) );
}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const
inline void copy_n_and_update(Allocator &, Iterator p, std::size_t n) const
{
BOOST_ASSERT(n == 1); (void)n;
*p = ::boost::move(v_);
@@ -235,13 +235,13 @@ struct insert_move_proxy
};
template<class It, class Allocator>
BOOST_CONTAINER_FORCEINLINE insert_move_proxy<Allocator> get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits<It>::value_type) v)
inline insert_move_proxy<Allocator> get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits<It>::value_type) v)
{
return insert_move_proxy<Allocator>(v);
}
template<class It, class Allocator>
BOOST_CONTAINER_FORCEINLINE insert_copy_proxy<Allocator> get_insert_value_proxy(const typename boost::container::iterator_traits<It>::value_type &v)
inline insert_copy_proxy<Allocator> get_insert_value_proxy(const typename boost::container::iterator_traits<It>::value_type &v)
{
return insert_copy_proxy<Allocator>(v);
}
@@ -266,17 +266,17 @@ struct insert_nonmovable_emplace_proxy
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args)
inline explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args)
: args_(args...)
{}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
{ this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); }
private:
template<std::size_t ...IdxPack, class Iterator>
BOOST_CONTAINER_FORCEINLINE void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, std::size_t n)
inline void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, std::size_t n)
{
BOOST_ASSERT(n == 1); (void)n;
alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward<Args>(get<IdxPack>(this->args_))... );
@@ -297,18 +297,18 @@ struct insert_emplace_proxy
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args)
inline explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args)
: base_t(::boost::forward<Args>(args)...)
{}
template<class Iterator>
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
inline void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)
{ this->priv_copy_some_and_update(a, index_tuple_t(), p, n); }
private:
template<std::size_t ...IdxPack, class Iterator>
BOOST_CONTAINER_FORCEINLINE void priv_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, std::size_t n)
inline void priv_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, std::size_t n)
{
BOOST_ASSERT(n ==1); (void)n;
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;
@@ -333,7 +333,7 @@ struct insert_emplace_proxy<Allocator, typename boost::container::allocator_trai
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(typename boost::container::allocator_traits<Allocator>::value_type &&v)
inline explicit insert_emplace_proxy(typename boost::container::allocator_traits<Allocator>::value_type &&v)
: insert_move_proxy<Allocator>(v)
{}
};
@@ -350,7 +350,7 @@ struct insert_emplace_proxy<Allocator
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_copy_proxy<Allocator>(v)
{}
};
@@ -361,7 +361,7 @@ struct insert_emplace_proxy<Allocator, typename boost::container::allocator_trai
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_copy_proxy<Allocator>(v)
{}
};
@@ -374,7 +374,7 @@ struct insert_emplace_proxy<Allocator
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_copy_proxy<Allocator>(v)
{}
};
@@ -398,18 +398,18 @@ struct insert_nonmovable_emplace_proxy##N\
\
static const bool single_value = true;\
\
BOOST_CONTAINER_FORCEINLINE explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\
inline explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\
BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\
\
template<class Iterator>\
BOOST_CONTAINER_FORCEINLINE void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\
inline void uninitialized_copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\
{\
BOOST_ASSERT(n == 1); (void)n;\
alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
}\
\
template<class Iterator>\
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &, Iterator, std::size_t)\
inline void copy_n_and_update(Allocator &, Iterator, std::size_t)\
{ BOOST_ASSERT(false); }\
\
protected:\
@@ -427,11 +427,11 @@ struct insert_emplace_proxy_arg##N\
\
static const bool single_value = true;\
\
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\
inline explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\
: base_t(BOOST_MOVE_FWD##N){}\
\
template<class Iterator>\
BOOST_CONTAINER_FORCEINLINE void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\
inline void copy_n_and_update(Allocator &a, Iterator p, std::size_t n)\
{\
BOOST_ASSERT(n == 1); (void)n;\
typename dtl::aligned_storage<sizeof(value_type), dtl::alignment_of<value_type>::value>::type v;\
@@ -461,7 +461,7 @@ struct insert_emplace_proxy_arg1<Allocator, ::boost::rv<typename boost::containe
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_move_proxy<Allocator>(v)
{}
};
@@ -472,7 +472,7 @@ struct insert_emplace_proxy_arg1<Allocator, typename boost::container::allocator
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_copy_proxy<Allocator>(v)
{}
};
@@ -486,7 +486,7 @@ struct insert_emplace_proxy_arg1<Allocator, typename boost::container::allocator
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &&v)
inline explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &&v)
: insert_move_proxy<Allocator>(v)
{}
};
@@ -502,7 +502,7 @@ struct insert_emplace_proxy_arg1<Allocator
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_copy_proxy<Allocator>(v)
{}
};
@@ -513,7 +513,7 @@ struct insert_emplace_proxy_arg1<Allocator, typename boost::container::allocator
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_copy_proxy<Allocator>(v)
{}
};
@@ -526,7 +526,7 @@ struct insert_emplace_proxy_arg1<Allocator
{
static const bool single_value = true;
BOOST_CONTAINER_FORCEINLINE explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
inline explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
: insert_copy_proxy<Allocator>(v)
{}
};
@@ -27,30 +27,30 @@ namespace container {
namespace dtl {
template<class AllocatorType>
BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
inline void swap_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
BOOST_NOEXCEPT_OR_NOTHROW
{}
template<class AllocatorType>
BOOST_CONTAINER_FORCEINLINE void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
inline void swap_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
{ boost::adl_move_swap(l, r); }
template<class AllocatorType>
BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
inline void assign_alloc(AllocatorType &, const AllocatorType &, dtl::false_type)
BOOST_NOEXCEPT_OR_NOTHROW
{}
template<class AllocatorType>
BOOST_CONTAINER_FORCEINLINE void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
inline void assign_alloc(AllocatorType &l, const AllocatorType &r, dtl::true_type)
{ l = r; }
template<class AllocatorType>
BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
inline void move_alloc(AllocatorType &, AllocatorType &, dtl::false_type)
BOOST_NOEXCEPT_OR_NOTHROW
{}
template<class AllocatorType>
BOOST_CONTAINER_FORCEINLINE void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
inline void move_alloc(AllocatorType &l, AllocatorType &r, dtl::true_type)
{ l = ::boost::move(r); }
} //namespace dtl {
@@ -46,19 +46,19 @@ struct allocator_version_traits
typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
//Node allocation interface
BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a)
inline static pointer allocate_one(Allocator &a)
{ return a.allocate_one(); }
BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p)
inline static void deallocate_one(Allocator &a, const pointer &p)
{ a.deallocate_one(p); }
BOOST_CONTAINER_FORCEINLINE static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
inline static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
{ return a.allocate_individual(n, m); }
BOOST_CONTAINER_FORCEINLINE static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
inline static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
{ a.deallocate_individual(holder); }
BOOST_CONTAINER_FORCEINLINE static pointer allocation_command(Allocator &a, allocation_type command,
inline static pointer allocation_command(Allocator &a, allocation_type command,
size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
{ return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); }
};
@@ -82,10 +82,10 @@ struct allocator_version_traits<Allocator, 1>
< multialloc_cached_counted, value_type> multiallocation_chain;
//Node allocation interface
BOOST_CONTAINER_FORCEINLINE static pointer allocate_one(Allocator &a)
inline static pointer allocate_one(Allocator &a)
{ return a.allocate(1); }
BOOST_CONTAINER_FORCEINLINE static void deallocate_one(Allocator &a, const pointer &p)
inline static void deallocate_one(Allocator &a, const pointer &p)
{ a.deallocate(p, 1); }
static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
@@ -102,17 +102,17 @@ struct allocator_version_traits<Allocator, 1>
struct allocate_individual_rollback
{
BOOST_CONTAINER_FORCEINLINE allocate_individual_rollback(Allocator &a, multiallocation_chain &chain)
inline allocate_individual_rollback(Allocator &a, multiallocation_chain &chain)
: mr_a(a), mp_chain(&chain)
{}
BOOST_CONTAINER_FORCEINLINE ~allocate_individual_rollback()
inline ~allocate_individual_rollback()
{
if(mp_chain)
allocator_version_traits::deallocate_individual(mr_a, *mp_chain);
}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{
mp_chain = 0;
}
@@ -32,11 +32,11 @@ class equal_to_value
const value_type &t_;
public:
BOOST_CONTAINER_FORCEINLINE explicit equal_to_value(const value_type &t)
inline explicit equal_to_value(const value_type &t)
: t_(t)
{}
BOOST_CONTAINER_FORCEINLINE bool operator()(const value_type &t)const
inline bool operator()(const value_type &t)const
{ return t_ == t; }
};
@@ -47,39 +47,39 @@ struct value_to_node_compare
typedef Pred predicate_type;
typedef Node node_type;
BOOST_CONTAINER_FORCEINLINE value_to_node_compare()
inline value_to_node_compare()
: Pred()
{}
BOOST_CONTAINER_FORCEINLINE explicit value_to_node_compare(Pred pred)
inline explicit value_to_node_compare(Pred pred)
: Pred(pred)
{}
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b) const
inline Ret operator()(const Node &a, const Node &b) const
{ return static_cast<const Pred&>(*this)(a.get_data(), b.get_data()); }
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a) const
inline Ret operator()(const Node &a) const
{ return static_cast<const Pred&>(*this)(a.get_data()); }
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a, const Node &b)
inline Ret operator()(const Node &a, const Node &b)
{ return static_cast<Pred&>(*this)(a.get_data(), b.get_data()); }
BOOST_CONTAINER_FORCEINLINE Ret operator()(const Node &a)
inline Ret operator()(const Node &a)
{ return static_cast<Pred&>(*this)(a.get_data()); }
BOOST_CONTAINER_FORCEINLINE predicate_type & predicate() { return static_cast<predicate_type&>(*this); }
BOOST_CONTAINER_FORCEINLINE const predicate_type & predicate() const { return static_cast<predicate_type&>(*this); }
inline predicate_type & predicate() { return static_cast<predicate_type&>(*this); }
inline const predicate_type & predicate() const { return static_cast<predicate_type&>(*this); }
};
template<class KeyPred, class KeyOfValue, class Node, class Ret = bool>
struct key_node_pred
: public boost::intrusive::detail::ebo_functor_holder<KeyPred>
{
BOOST_CONTAINER_FORCEINLINE explicit key_node_pred(const KeyPred &comp)
inline explicit key_node_pred(const KeyPred &comp)
: base_t(comp)
{}
BOOST_CONTAINER_FORCEINLINE explicit key_node_pred()
inline explicit key_node_pred()
{}
typedef boost::intrusive::detail::ebo_functor_holder<KeyPred> base_t;
@@ -88,42 +88,42 @@ struct key_node_pred
typedef typename KeyOfValue::type key_type;
BOOST_CONTAINER_FORCEINLINE static const key_type &key_from(const Node &n)
inline static const key_type &key_from(const Node &n)
{
return key_of_value()(n.get_data());
}
template <class T>
BOOST_CONTAINER_FORCEINLINE static const T &
inline static const T &
key_from(const T &t)
{ return t; }
BOOST_CONTAINER_FORCEINLINE const key_predicate &key_pred() const
inline const key_predicate &key_pred() const
{ return static_cast<const key_predicate &>(*this); }
BOOST_CONTAINER_FORCEINLINE key_predicate &key_pred()
inline key_predicate &key_pred()
{ return static_cast<key_predicate &>(*this); }
BOOST_CONTAINER_FORCEINLINE Ret operator()(const key_type &key) const
inline Ret operator()(const key_type &key) const
{ return this->key_pred()(key); }
template<class U>
BOOST_CONTAINER_FORCEINLINE Ret operator()(const U &nonkey) const
inline Ret operator()(const U &nonkey) const
{ return this->key_pred()(this->key_from(nonkey)); }
BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
inline bool operator()(const key_type &key1, const key_type &key2) const
{ return this->key_pred()(key1, key2); }
template<class U>
BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
inline bool operator()(const key_type &key1, const U &nonkey2) const
{ return this->key_pred()(key1, this->key_from(nonkey2)); }
template<class U>
BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
inline bool operator()(const U &nonkey1, const key_type &key2) const
{ return this->key_pred()(this->key_from(nonkey1), key2); }
template<class U, class V>
BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
inline bool operator()(const U &nonkey1, const V &nonkey2) const
{ return this->key_pred()(this->key_from(nonkey1), this->key_from(nonkey2)); }
};
@@ -46,7 +46,12 @@
# endif
//GCC 8 seems a bit confused about array access error with static_vector
//when out of bound exceptions are being thrown.
# if defined(BOOST_GCC) && (BOOST_GCC >= 80000) && (BOOST_GCC < 80200)
# if defined(BOOST_GCC) && ((BOOST_GCC >= 80000) && (BOOST_GCC < 80200))
# pragma GCC diagnostic ignored "-Wstringop-overflow"
# endif
//GCC 12 seems a bit confused about array access error with small_vector
# if defined(BOOST_GCC) && ((BOOST_GCC >= 120000) && (BOOST_GCC < 130000))
# pragma GCC diagnostic ignored "-Wstringop-overread"
# pragma GCC diagnostic ignored "-Wstringop-overflow"
# endif
# pragma GCC diagnostic ignored "-Warray-bounds"
@@ -214,7 +219,7 @@ struct disable_if_single_value_proxy
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
inline F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
{
typedef typename boost::container::iter_value<I>::type value_type;
typedef typename boost::container::iterator_traits<F>::difference_type r_difference_type;
@@ -232,7 +237,7 @@ BOOST_CONTAINER_FORCEINLINE F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE F memmove_n(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
inline F memmove_n(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{
typedef typename boost::container::iter_value<I>::type value_type;
typedef typename boost::container::iterator_traits<F>::difference_type r_difference_type;
@@ -250,7 +255,7 @@ BOOST_CONTAINER_FORCEINLINE F memmove_n(I f, std::size_t n, F r) BOOST_NOEXCEPT_
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE I memmove_n_source(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
inline I memmove_n_source(I f, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{
if(BOOST_LIKELY(n != 0)){
typedef typename boost::container::iter_value<I>::type value_type;
@@ -267,7 +272,7 @@ BOOST_CONTAINER_FORCEINLINE I memmove_n_source(I f, std::size_t n, F r) BOOST_NO
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE I memmove_n_source_dest(I f, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
inline I memmove_n_source_dest(I f, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
{
typedef typename boost::container::iter_value<I>::type value_type;
typedef typename boost::container::iterator_traits<F>::difference_type i_difference_type;
@@ -367,7 +372,7 @@ template
<typename Allocator,
typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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 dtl::memmove(f, l, r); }
@@ -413,7 +418,7 @@ template
<typename Allocator,
typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n(f, n, r); }
@@ -459,7 +464,7 @@ template
<typename Allocator,
typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n_source(f, n, r); }
@@ -504,7 +509,7 @@ template
<typename Allocator,
typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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 dtl::memmove(f, l, r); }
@@ -550,7 +555,7 @@ template
<typename Allocator,
typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n(f, n, r); }
@@ -595,7 +600,7 @@ template
<typename Allocator,
typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n_source(f, n, r); }
@@ -639,7 +644,7 @@ inline typename dtl::disable_if_memzero_initializable<F, F>::type
template
<typename Allocator,
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_memzero_initializable<F, F>::type
inline typename dtl::enable_if_memzero_initializable<F, F>::type
uninitialized_value_init_alloc_n(Allocator &, std::size_t n, F r)
{
typedef typename boost::container::iterator_traits<F>::value_type value_type;
@@ -812,7 +817,7 @@ template
<typename I, // I models InputIterator
typename U, // U models unsigned integral constant
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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 dtl::memmove_n(f, n, r); }
@@ -840,7 +845,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n_source(f, n, r); }
@@ -867,7 +872,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n_source_dest(f, n, r); }
@@ -922,7 +927,7 @@ template
<typename I, // I models InputIterator
typename U, // U models unsigned integral constant
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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 dtl::memmove_n(f, n, r); }
@@ -949,7 +954,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
template
<typename I, // I models InputIterator
typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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::iter_value<I>::type value_type;
@@ -985,7 +990,7 @@ inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
template
<typename I // I models InputIterator
,typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n_source_dest(f, n, r); }
@@ -1013,18 +1018,18 @@ inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
template
<typename I // I models InputIterator
,typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::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, std::size_t n, F r) BOOST_NOEXCEPT_OR_NOTHROW
{ return dtl::memmove_n_source(f, n, r); }
template<typename F> // F models ForwardIterator
BOOST_CONTAINER_FORCEINLINE F move_forward_overlapping(F f, F l, F r)
inline F move_forward_overlapping(F f, F l, F r)
{
return (f != r) ? (move)(f, l, r) : l;
}
template<typename B> // B models BidirIterator
BOOST_CONTAINER_FORCEINLINE B move_backward_overlapping(B f, B l, B rl)
inline B move_backward_overlapping(B f, B l, B rl)
{
return (l != rl) ? (move_backward)(f, l, rl) : f;
}
@@ -1054,7 +1059,7 @@ template
<typename Allocator
,typename I // I models InputIterator
,typename U> // U models unsigned integral constant
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_trivially_destructible<I, void>::type
inline typename dtl::enable_if_trivially_destructible<I, void>::type
destroy_alloc_n(Allocator &, I, U)
{}
@@ -1079,7 +1084,7 @@ inline typename dtl::disable_if_trivially_destructible<I, void>::type
template
<typename Allocator
,typename I > // I models InputIterator
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_trivially_destructible<I, void>::type
inline typename dtl::enable_if_trivially_destructible<I, void>::type
destroy_alloc(Allocator &, I, I)
{}
@@ -1458,7 +1463,7 @@ template
, typename F // F models ForwardIterator
, typename InsertionProxy
>
BOOST_CONTAINER_FORCEINLINE void expand_forward_and_insert_alloc
inline void expand_forward_and_insert_alloc
( Allocator& a
, F pos
, F last
@@ -1780,7 +1785,7 @@ template
, typename B // B models BidirIterator
, typename InsertionProxy
>
BOOST_CONTAINER_FORCEINLINE void expand_backward_forward_and_insert_alloc_move_forward
inline void expand_backward_forward_and_insert_alloc_move_forward
( B const old_start
, std::size_t const old_size
, B const new_start
+48 -48
View File
@@ -180,23 +180,23 @@ struct scoped_destructor_n
typedef Ptr pointer;
typedef typename AllocTraits::value_type value_type;
BOOST_CONTAINER_FORCEINLINE scoped_destructor_n(Ptr p, Allocator& a, std::size_t n)
inline scoped_destructor_n(Ptr p, Allocator& a, std::size_t n)
: m_p(p), m_n(n), m_a(a)
{}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{ m_p = Ptr(); m_n = 0; }
BOOST_CONTAINER_FORCEINLINE void increment_size(std::size_t inc)
inline void increment_size(std::size_t inc)
{ m_n += inc; }
BOOST_CONTAINER_FORCEINLINE void increment_size_backwards(std::size_t inc)
inline void increment_size_backwards(std::size_t inc)
{ m_n += inc; m_p -= std::ptrdiff_t(inc); }
BOOST_CONTAINER_FORCEINLINE void shrink_forward(std::size_t inc)
inline void shrink_forward(std::size_t inc)
{ m_n -= inc; m_p += std::ptrdiff_t(inc); }
BOOST_CONTAINER_FORCEINLINE void set_size(std::size_t sz)
inline void set_size(std::size_t sz)
{ m_n = sz; }
~scoped_destructor_n()
@@ -225,22 +225,22 @@ struct null_scoped_destructor_n
typedef boost::container::allocator_traits<Allocator> AllocTraits;
typedef Ptr pointer;
BOOST_CONTAINER_FORCEINLINE null_scoped_destructor_n(Ptr, Allocator&, std::size_t)
inline null_scoped_destructor_n(Ptr, Allocator&, std::size_t)
{}
BOOST_CONTAINER_FORCEINLINE void increment_size(std::size_t)
inline void increment_size(std::size_t)
{}
BOOST_CONTAINER_FORCEINLINE void increment_size_backwards(std::size_t)
inline void increment_size_backwards(std::size_t)
{}
BOOST_CONTAINER_FORCEINLINE void set_size(std::size_t )
inline void set_size(std::size_t )
{}
BOOST_CONTAINER_FORCEINLINE void shrink_forward(std::size_t)
inline void shrink_forward(std::size_t)
{}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{}
};
@@ -254,20 +254,20 @@ struct scoped_destructor_range
typedef typename AllocTraits::pointer pointer;
typedef typename AllocTraits::value_type value_type;
BOOST_CONTAINER_FORCEINLINE scoped_destructor_range(pointer p, pointer e, Allocator& a)
inline scoped_destructor_range(pointer p, pointer e, Allocator& a)
: m_p(p), m_e(e), m_a(a)
{}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{ m_p = pointer(); m_e = pointer(); }
BOOST_CONTAINER_FORCEINLINE void set_end(pointer e)
inline void set_end(pointer e)
{ m_e = e; }
BOOST_CONTAINER_FORCEINLINE void set_begin(pointer b)
inline void set_begin(pointer b)
{ m_p = b; }
BOOST_CONTAINER_FORCEINLINE void set_range(pointer b, pointer e)
inline void set_range(pointer b, pointer e)
{ m_p = b; m_e = e; }
~scoped_destructor_range()
@@ -293,19 +293,19 @@ struct null_scoped_destructor_range
typedef boost::container::allocator_traits<Allocator> AllocTraits;
typedef typename AllocTraits::pointer pointer;
BOOST_CONTAINER_FORCEINLINE null_scoped_destructor_range(pointer, pointer, Allocator&)
inline null_scoped_destructor_range(pointer, pointer, Allocator&)
{}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{}
BOOST_CONTAINER_FORCEINLINE void set_end(pointer)
inline void set_end(pointer)
{}
BOOST_CONTAINER_FORCEINLINE void set_begin(pointer)
inline void set_begin(pointer)
{}
BOOST_CONTAINER_FORCEINLINE void set_range(pointer, pointer)
inline void set_range(pointer, pointer)
{}
};
@@ -316,24 +316,24 @@ class scoped_destructor
typedef boost::container::allocator_traits<Allocator> AllocTraits;
public:
typedef typename Allocator::value_type value_type;
BOOST_CONTAINER_FORCEINLINE scoped_destructor(Allocator &a, value_type *pv)
inline scoped_destructor(Allocator &a, value_type *pv)
: pv_(pv), a_(a)
{}
BOOST_CONTAINER_FORCEINLINE ~scoped_destructor()
inline ~scoped_destructor()
{
if(pv_){
AllocTraits::destroy(a_, pv_);
}
}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{ pv_ = 0; }
BOOST_CONTAINER_FORCEINLINE void set(value_type *ptr) { pv_ = ptr; }
inline void set(value_type *ptr) { pv_ = ptr; }
BOOST_CONTAINER_FORCEINLINE value_type *get() const { return pv_; }
inline value_type *get() const { return pv_; }
private:
value_type *pv_;
@@ -346,18 +346,18 @@ class null_scoped_destructor
typedef boost::container::allocator_traits<Allocator> AllocTraits;
public:
typedef typename Allocator::value_type value_type;
BOOST_CONTAINER_FORCEINLINE null_scoped_destructor(Allocator &, value_type *)
inline null_scoped_destructor(Allocator &, value_type *)
{}
BOOST_CONTAINER_FORCEINLINE ~null_scoped_destructor()
inline ~null_scoped_destructor()
{}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{}
BOOST_CONTAINER_FORCEINLINE void set(value_type *) { }
inline void set(value_type *) { }
BOOST_CONTAINER_FORCEINLINE value_type *get() const { return 0; }
inline value_type *get() const { return 0; }
};
@@ -368,11 +368,11 @@ class value_destructor
typedef boost::container::allocator_traits<Allocator> AllocTraits;
public:
typedef Value value_type;
BOOST_CONTAINER_FORCEINLINE value_destructor(Allocator &a, value_type &rv)
inline value_destructor(Allocator &a, value_type &rv)
: rv_(rv), a_(a)
{}
BOOST_CONTAINER_FORCEINLINE ~value_destructor()
inline ~value_destructor()
{
AllocTraits::destroy(a_, &rv_);
}
@@ -396,18 +396,18 @@ class allocator_node_destroyer
Allocator & a_;
private:
BOOST_CONTAINER_FORCEINLINE void priv_deallocate(const pointer &p, version_1)
inline void priv_deallocate(const pointer &p, version_1)
{ AllocTraits::deallocate(a_,p, 1); }
BOOST_CONTAINER_FORCEINLINE void priv_deallocate(const pointer &p, version_2)
inline void priv_deallocate(const pointer &p, version_2)
{ a_.deallocate_one(p); }
public:
BOOST_CONTAINER_FORCEINLINE explicit allocator_node_destroyer(Allocator &a)
inline explicit allocator_node_destroyer(Allocator &a)
: a_(a)
{}
BOOST_CONTAINER_FORCEINLINE void operator()(const pointer &p)
inline void operator()(const pointer &p)
{
boost::movelib::to_raw_pointer(p)->destructor(a_);
this->priv_deallocate(p, alloc_version());
@@ -420,24 +420,24 @@ class scoped_node_destructor
typedef boost::container::allocator_traits<Allocator> AllocTraits;
public:
typedef typename Allocator::value_type value_type;
BOOST_CONTAINER_FORCEINLINE scoped_node_destructor(Allocator &a, value_type *pv)
inline scoped_node_destructor(Allocator &a, value_type *pv)
: pv_(pv), a_(a)
{}
BOOST_CONTAINER_FORCEINLINE ~scoped_node_destructor()
inline ~scoped_node_destructor()
{
if(pv_){
pv_->destructor(a_);
}
}
BOOST_CONTAINER_FORCEINLINE void release()
inline void release()
{ pv_ = 0; }
BOOST_CONTAINER_FORCEINLINE void set(value_type *ptr) { pv_ = ptr; }
inline void set(value_type *ptr) { pv_ = ptr; }
BOOST_CONTAINER_FORCEINLINE value_type *get() const { return pv_; }
inline value_type *get() const { return pv_; }
private:
value_type *pv_;
@@ -457,11 +457,11 @@ class allocator_node_destroyer_and_chain_builder
multiallocation_chain &c_;
public:
BOOST_CONTAINER_FORCEINLINE allocator_node_destroyer_and_chain_builder(Allocator &a, multiallocation_chain &c)
inline allocator_node_destroyer_and_chain_builder(Allocator &a, multiallocation_chain &c)
: a_(a), c_(c)
{}
BOOST_CONTAINER_FORCEINLINE void operator()(const typename Allocator::pointer &p)
inline void operator()(const typename Allocator::pointer &p)
{
boost::movelib::to_raw_pointer(p)->destructor(a_);
c_.push_back(p);
@@ -480,14 +480,14 @@ class allocator_multialloc_chain_node_deallocator
multiallocation_chain c_;
public:
BOOST_CONTAINER_FORCEINLINE allocator_multialloc_chain_node_deallocator(Allocator &a)
inline allocator_multialloc_chain_node_deallocator(Allocator &a)
: a_(a), c_()
{}
BOOST_CONTAINER_FORCEINLINE chain_builder get_chain_builder()
inline chain_builder get_chain_builder()
{ return chain_builder(a_, c_); }
BOOST_CONTAINER_FORCEINLINE ~allocator_multialloc_chain_node_deallocator()
inline ~allocator_multialloc_chain_node_deallocator()
{
a_.deallocate_individual(c_);
}
@@ -110,7 +110,7 @@ template < typename ConstructAlloc
, typename T
, class ...Args
>
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
inline typename dtl::enable_if_and
< void
, dtl::is_not_pair<T>
, dtl::not_< uses_allocator<T, typename remove_cvref<ArgAlloc>::type > >
@@ -127,7 +127,7 @@ template < typename ConstructAlloc
, typename T
, class ...Args
>
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
inline typename dtl::enable_if_and
< void
, dtl::is_not_pair<T>
, uses_allocator<T, typename remove_cvref<ArgAlloc>::type>
@@ -146,7 +146,7 @@ template < typename ConstructAlloc
, typename T
, class ...Args
>
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
inline typename dtl::enable_if_and
< void
, dtl::is_not_pair<T>
, uses_allocator<T, typename remove_cvref<ArgAlloc>::type>
@@ -162,7 +162,7 @@ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
template <typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\
inline typename dtl::enable_if_and\
< void\
, dtl::is_not_pair<T>\
, dtl::not_<uses_allocator<T, typename remove_cvref<ArgAlloc>::type> >\
@@ -179,7 +179,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\
inline typename dtl::enable_if_and\
< void\
, dtl::is_not_pair<T>\
, uses_allocator<T, typename remove_cvref<ArgAlloc>::type>\
@@ -197,7 +197,7 @@ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR
#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \
template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and\
inline typename dtl::enable_if_and\
< void\
, dtl::is_not_pair<T>\
, uses_allocator<T, typename remove_cvref<ArgAlloc>::type>\
+129 -129
View File
@@ -135,7 +135,7 @@ BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(stored_allocator_type)
//
///////////////////////////////////////
template<class SequenceContainer, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguous_container == true
inline void flat_tree_container_inplace_merge //is_contiguous_container == true
(SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::true_)
{
typedef typename SequenceContainer::value_type value_type;
@@ -149,7 +149,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguo
}
template<class SequenceContainer, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguous_container == false
inline void flat_tree_container_inplace_merge //is_contiguous_container == false
(SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::false_)
{
boost::movelib::adaptive_merge(dest.begin(), it, dest.end(), comp);
@@ -161,7 +161,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_merge //is_contiguo
//
///////////////////////////////////////
template<class SequenceContainer, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_contiguous_container == true
inline void flat_tree_container_inplace_sort_ending //is_contiguous_container == true
(SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::true_)
{
typedef typename SequenceContainer::value_type value_type;
@@ -176,7 +176,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_co
}
template<class SequenceContainer, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_contiguous_container == false
inline void flat_tree_container_inplace_sort_ending //is_contiguous_container == false
(SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::false_)
{
boost::movelib::adaptive_sort(it, dest.end(), comp);
@@ -188,14 +188,14 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_container_inplace_sort_ending //is_co
//
///////////////////////////////////////
template<class SequenceContainer, class Iterator, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal
inline void flat_tree_merge_equal
(SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_)
{
dest.merge(first, last, comp);
}
template<class SequenceContainer, class Iterator, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal //has_merge_unique == false
inline void flat_tree_merge_equal //has_merge_unique == false
(SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_)
{
if(first != last) {
@@ -212,14 +212,14 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal //has_merge_unique == f
//
///////////////////////////////////////
template<class SequenceContainer, class Iterator, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == true
inline void flat_tree_merge_unique //has_merge_unique == true
(SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_)
{
dest.merge_unique(first, last, comp);
}
template<class SequenceContainer, class Iterator, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == false
inline void flat_tree_merge_unique //has_merge_unique == false
(SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_)
{
if (first != last) {
@@ -242,7 +242,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == f
//
///////////////////////////////////////
template<class SequenceContainer, class Iterator>
BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
inline typename SequenceContainer::size_type
flat_tree_index_of // has_index_of == true
(SequenceContainer& cont, Iterator p, dtl::true_)
{
@@ -250,7 +250,7 @@ BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
}
template<class SequenceContainer, class Iterator>
BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
inline typename SequenceContainer::size_type
flat_tree_index_of // has_index_of == false
(SequenceContainer& cont, Iterator p, dtl::false_)
{
@@ -264,7 +264,7 @@ BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
//
///////////////////////////////////////
template<class Iterator, class SequenceContainer>
BOOST_CONTAINER_FORCEINLINE Iterator
inline Iterator
flat_tree_nth // has_nth == true
(SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::true_)
{
@@ -272,7 +272,7 @@ BOOST_CONTAINER_FORCEINLINE Iterator
}
template<class Iterator, class SequenceContainer>
BOOST_CONTAINER_FORCEINLINE Iterator
inline Iterator
flat_tree_nth // has_nth == false
(SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::false_)
{
@@ -285,7 +285,7 @@ BOOST_CONTAINER_FORCEINLINE Iterator
//
///////////////////////////////////////
template<class SequenceContainer>
BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::stored_allocator_type &
inline typename SequenceContainer::stored_allocator_type &
flat_tree_get_stored_allocator // has_get_stored_allocator == true
(SequenceContainer& cont, dtl::true_)
{
@@ -293,7 +293,7 @@ BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::stored_allocator_type &
}
template<class SequenceContainer>
BOOST_CONTAINER_FORCEINLINE const typename SequenceContainer::stored_allocator_type &
inline const typename SequenceContainer::stored_allocator_type &
flat_tree_get_stored_allocator // has_get_stored_allocator == true
(const SequenceContainer& cont, dtl::true_)
{
@@ -301,7 +301,7 @@ BOOST_CONTAINER_FORCEINLINE const typename SequenceContainer::stored_allocator_t
}
template<class SequenceContainer>
BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::allocator_type
inline typename SequenceContainer::allocator_type
flat_tree_get_stored_allocator // has_get_stored_allocator == false
(SequenceContainer& cont, dtl::false_)
{
@@ -337,7 +337,7 @@ void flat_tree_sort_contiguous_to_adopt // is_contiguous_container == true
}
template<class SequenceContainer, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_adopt_sequence_equal // is_contiguous_container == true
inline void flat_tree_adopt_sequence_equal // is_contiguous_container == true
(SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::true_)
{
flat_tree_sort_contiguous_to_adopt(tseq, boost::move(seq), comp);
@@ -345,7 +345,7 @@ BOOST_CONTAINER_FORCEINLINE void flat_tree_adopt_sequence_equal // is_contiguous
}
template<class SequenceContainer, class Compare>
BOOST_CONTAINER_FORCEINLINE void flat_tree_adopt_sequence_equal // is_contiguous_container == false
inline void flat_tree_adopt_sequence_equal // is_contiguous_container == false
(SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::false_)
{
boost::movelib::adaptive_sort(seq.begin(), seq.end(), comp);
@@ -386,14 +386,14 @@ void flat_tree_adopt_sequence_unique// is_contiguous_container == false
//
///////////////////////////////////////
template<class SequenceContainer>
BOOST_CONTAINER_FORCEINLINE void // has_reserve == true
inline void // has_reserve == true
flat_tree_reserve(SequenceContainer &tseq, typename SequenceContainer::size_type cap, dtl::true_)
{
tseq.reserve(cap);
}
template<class SequenceContainer>
BOOST_CONTAINER_FORCEINLINE void // has_reserve == false
inline void // has_reserve == false
flat_tree_reserve(SequenceContainer &, typename SequenceContainer::size_type, dtl::false_)
{
}
@@ -404,14 +404,14 @@ BOOST_CONTAINER_FORCEINLINE void // has_reserve == false
//
///////////////////////////////////////
template<class SequenceContainer> // has_capacity == true
BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
inline typename SequenceContainer::size_type
flat_tree_capacity(const SequenceContainer &tseq, dtl::true_)
{
return tseq.capacity();
}
template<class SequenceContainer> // has_capacity == false
BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
inline typename SequenceContainer::size_type
flat_tree_capacity(const SequenceContainer &tseq, dtl::false_)
{
return tseq.size();
@@ -431,24 +431,24 @@ class flat_tree_value_compare
typedef Value second_argument_type;
typedef bool return_type;
public:
BOOST_CONTAINER_FORCEINLINE flat_tree_value_compare()
inline flat_tree_value_compare()
: Compare()
{}
BOOST_CONTAINER_FORCEINLINE flat_tree_value_compare(const Compare &pred)
inline flat_tree_value_compare(const Compare &pred)
: Compare(pred)
{}
BOOST_CONTAINER_FORCEINLINE bool operator()(const Value& lhs, const Value& rhs) const
inline bool operator()(const Value& lhs, const Value& rhs) const
{
KeyOfValue key_extract;
return Compare::operator()(key_extract(lhs), key_extract(rhs));
}
BOOST_CONTAINER_FORCEINLINE const Compare &get_comp() const
inline const Compare &get_comp() const
{ return *this; }
BOOST_CONTAINER_FORCEINLINE Compare &get_comp()
inline Compare &get_comp()
{ return *this; }
};
@@ -502,35 +502,35 @@ class flat_tree
BOOST_COPYABLE_AND_MOVABLE(Data)
public:
BOOST_CONTAINER_FORCEINLINE Data()
inline Data()
: value_compare(), m_seq()
{}
BOOST_CONTAINER_FORCEINLINE explicit Data(const allocator_t &alloc)
inline explicit Data(const allocator_t &alloc)
: value_compare(), m_seq(alloc)
{}
BOOST_CONTAINER_FORCEINLINE explicit Data(const Compare &comp)
inline explicit Data(const Compare &comp)
: value_compare(comp), m_seq()
{}
BOOST_CONTAINER_FORCEINLINE Data(const Compare &comp, const allocator_t &alloc)
inline Data(const Compare &comp, const allocator_t &alloc)
: value_compare(comp), m_seq(alloc)
{}
BOOST_CONTAINER_FORCEINLINE explicit Data(const Data &d)
inline explicit Data(const Data &d)
: value_compare(static_cast<const value_compare&>(d)), m_seq(d.m_seq)
{}
BOOST_CONTAINER_FORCEINLINE Data(BOOST_RV_REF(Data) d)
inline Data(BOOST_RV_REF(Data) d)
: value_compare(boost::move(static_cast<value_compare&>(d))), m_seq(boost::move(d.m_seq))
{}
BOOST_CONTAINER_FORCEINLINE Data(const Data &d, const allocator_t &a)
inline Data(const Data &d, const allocator_t &a)
: value_compare(static_cast<const value_compare&>(d)), m_seq(d.m_seq, a)
{}
BOOST_CONTAINER_FORCEINLINE Data(BOOST_RV_REF(Data) d, const allocator_t &a)
inline Data(BOOST_RV_REF(Data) d, const allocator_t &a)
: value_compare(boost::move(static_cast<value_compare&>(d))), m_seq(boost::move(d.m_seq), a)
{}
@@ -596,41 +596,41 @@ class flat_tree
typedef typename dtl::if_c
<has_stored_allocator_type, stored_allocator_type &, allocator_type>::type get_stored_allocator_noconst_return_t;
BOOST_CONTAINER_FORCEINLINE flat_tree()
inline flat_tree()
: m_data()
{ }
BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const Compare& comp)
inline explicit flat_tree(const Compare& comp)
: m_data(comp)
{ }
BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const allocator_type& a)
inline explicit flat_tree(const allocator_type& a)
: m_data(a)
{ }
BOOST_CONTAINER_FORCEINLINE flat_tree(const Compare& comp, const allocator_type& a)
inline flat_tree(const Compare& comp, const allocator_type& a)
: m_data(comp, a)
{ }
BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x)
inline flat_tree(const flat_tree& x)
: m_data(x.m_data)
{ }
BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x)
inline flat_tree(BOOST_RV_REF(flat_tree) x)
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
: m_data(boost::move(x.m_data))
{ }
BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x, const allocator_type &a)
inline flat_tree(const flat_tree& x, const allocator_type &a)
: m_data(x.m_data, a)
{ }
BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a)
inline flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a)
: m_data(boost::move(x.m_data), a)
{ }
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( ordered_range_t, InputIterator first, InputIterator last)
: m_data()
{
@@ -639,7 +639,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
: m_data(comp)
{
@@ -648,7 +648,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
: m_data(comp, a)
{
@@ -657,7 +657,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last)
: m_data()
{
@@ -666,7 +666,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
: m_data(comp)
{
@@ -675,7 +675,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
: m_data(comp, a)
{
@@ -684,7 +684,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( bool unique_insertion, InputIterator first, InputIterator last)
: m_data()
{
@@ -692,7 +692,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( bool unique_insertion, InputIterator first, InputIterator last
, const Compare& comp)
: m_data(comp)
@@ -701,7 +701,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( bool unique_insertion, InputIterator first, InputIterator last
, const allocator_type& a)
: m_data(a)
@@ -710,7 +710,7 @@ class flat_tree
}
template <class InputIterator>
BOOST_CONTAINER_FORCEINLINE
inline
flat_tree( bool unique_insertion, InputIterator first, InputIterator last
, const Compare& comp, const allocator_type& a)
: m_data(comp, a)
@@ -718,28 +718,28 @@ class flat_tree
this->priv_range_insertion_construct(unique_insertion, first, last);
}
BOOST_CONTAINER_FORCEINLINE ~flat_tree()
inline ~flat_tree()
{}
BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x)
inline flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x)
{ m_data = x.m_data; return *this; }
BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
inline flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
allocator_traits_type::is_always_equal::value) &&
boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
{ m_data = boost::move(x.m_data); return *this; }
BOOST_CONTAINER_FORCEINLINE const value_compare &priv_value_comp() const
inline const value_compare &priv_value_comp() const
{ return static_cast<const value_compare &>(this->m_data); }
BOOST_CONTAINER_FORCEINLINE value_compare &priv_value_comp()
inline value_compare &priv_value_comp()
{ return static_cast<value_compare &>(this->m_data); }
BOOST_CONTAINER_FORCEINLINE const key_compare &priv_key_comp() const
inline const key_compare &priv_key_comp() const
{ return this->priv_value_comp().get_comp(); }
BOOST_CONTAINER_FORCEINLINE key_compare &priv_key_comp()
inline key_compare &priv_key_comp()
{ return this->priv_value_comp().get_comp(); }
struct insert_commit_data
@@ -749,91 +749,91 @@ class flat_tree
public:
// accessors:
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
Compare key_comp() const
{ return this->m_data.get_comp(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
value_compare value_comp() const
{ return this->m_data; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
allocator_type get_allocator() const
{ return this->m_data.m_seq.get_allocator(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
get_stored_allocator_const_return_t get_stored_allocator() const
{
return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
get_stored_allocator_noconst_return_t get_stored_allocator()
{
return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator begin()
{ return this->m_data.m_seq.begin(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator begin() const
{ return this->cbegin(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator cbegin() const
{ return this->m_data.m_seq.begin(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator end()
{ return this->m_data.m_seq.end(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator end() const
{ return this->cend(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator cend() const
{ return this->m_data.m_seq.end(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reverse_iterator rbegin()
{ return reverse_iterator(this->end()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator rbegin() const
{ return this->crbegin(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator crbegin() const
{ return const_reverse_iterator(this->cend()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reverse_iterator rend()
{ return reverse_iterator(this->begin()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator rend() const
{ return this->crend(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator crend() const
{ return const_reverse_iterator(this->cbegin()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
bool empty() const
{ return this->m_data.m_seq.empty(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type size() const
{ return this->m_data.m_seq.size(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type max_size() const
{ return this->m_data.m_seq.max_size(); }
BOOST_CONTAINER_FORCEINLINE void swap(flat_tree& other)
inline void swap(flat_tree& other)
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
&& boost::container::dtl::is_nothrow_swappable<Compare>::value )
{ this->m_data.swap(other.m_data); }
@@ -1017,7 +1017,7 @@ class flat_tree
}
template <class KeyType, class... Args>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
inline std::pair<iterator, bool> try_emplace
(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
{
std::pair<iterator,bool> ret;
@@ -1083,7 +1083,7 @@ class flat_tree
return this->insert_equal(hint, ::boost::move(*pval));\
}\
template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
inline std::pair<iterator, bool>\
try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
{\
std::pair<iterator,bool> ret;\
@@ -1126,7 +1126,7 @@ class flat_tree
return ret;
}
BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator position)
inline iterator erase(const_iterator position)
{ return this->m_data.m_seq.erase(position); }
size_type erase(const key_type& k)
@@ -1148,10 +1148,10 @@ class flat_tree
return ret;
}
BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
inline iterator erase(const_iterator first, const_iterator last)
{ return this->m_data.m_seq.erase(first, last); }
BOOST_CONTAINER_FORCEINLINE void clear()
inline void clear()
{ this->m_data.m_seq.clear(); }
//! <b>Effects</b>: Tries to deallocate the excess of memory created
@@ -1160,17 +1160,17 @@ class flat_tree
//! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
//!
//! <b>Complexity</b>: Linear to size().
BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
inline void shrink_to_fit()
{ this->m_data.m_seq.shrink_to_fit(); }
BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
inline iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
{
const bool value = boost::container::dtl::
has_member_function_callable_with_nth<container_type, size_type>::value;
return flat_tree_nth<iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
{
const bool value = boost::container::dtl::
@@ -1178,7 +1178,7 @@ class flat_tree
return flat_tree_nth<const_iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
{
const bool value = boost::container::dtl::
@@ -1186,7 +1186,7 @@ class flat_tree
return flat_tree_index_of(this->m_data.m_seq, p, dtl::bool_<value>());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
{
const bool value = boost::container::dtl::
@@ -1263,30 +1263,30 @@ class flat_tree
return n;
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE bool contains(const key_type& x) const
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline bool contains(const key_type& x) const
{ return this->find(x) != this->cend(); }
template<typename K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, bool>::type
contains(const K& x) const
{ return this->find(x) != this->cend(); }
template<class C2>
BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
inline void merge_unique(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
{
this->insert_unique( boost::make_move_iterator(source.begin())
, boost::make_move_iterator(source.end()));
}
template<class C2>
BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
inline void merge_equal(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
{
this->insert_equal( boost::make_move_iterator(source.begin())
, boost::make_move_iterator(source.end()));
}
BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree& source)
inline void merge_unique(flat_tree& source)
{
const bool value = boost::container::dtl::
has_member_function_callable_with_merge_unique<container_type, iterator, iterator, value_compare>::value;
@@ -1298,7 +1298,7 @@ class flat_tree
, dtl::bool_<value>());
}
BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree& source)
inline void merge_equal(flat_tree& source)
{
const bool value = boost::container::dtl::
has_member_function_callable_with_merge<container_type, iterator, iterator, value_compare>::value;
@@ -1310,88 +1310,88 @@ class flat_tree
, dtl::bool_<value>());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator lower_bound(const key_type& k)
{ return this->priv_lower_bound(this->begin(), this->end(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator lower_bound(const key_type& k) const
{ return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
lower_bound(const K& k)
{ return this->priv_lower_bound(this->begin(), this->end(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
lower_bound(const K& k) const
{ return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator upper_bound(const key_type& k)
{ return this->priv_upper_bound(this->begin(), this->end(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator upper_bound(const key_type& k) const
{ return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K,iterator>::type
upper_bound(const K& k)
{ return this->priv_upper_bound(this->begin(), this->end(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K,const_iterator>::type
upper_bound(const K& k) const
{ return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<iterator,iterator> equal_range(const key_type& k)
{ return this->priv_equal_range(this->begin(), this->end(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
{ return this->priv_equal_range(this->cbegin(), this->cend(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
equal_range(const K& k)
{ return this->priv_equal_range(this->begin(), this->end(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
equal_range(const K& k) const
{ return this->priv_equal_range(this->cbegin(), this->cend(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<iterator, iterator> lower_bound_range(const key_type& k)
{ return this->priv_lower_bound_range(this->begin(), this->end(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
{ return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K,std::pair<iterator,iterator> >::type
lower_bound_range(const K& k)
{ return this->priv_lower_bound_range(this->begin(), this->end(), k); }
template<class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
lower_bound_range(const K& k) const
{ return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type capacity() const
{
const bool value = boost::container::dtl::
@@ -1399,7 +1399,7 @@ class flat_tree
return (flat_tree_capacity)(this->m_data.m_seq, dtl::bool_<value>());
}
BOOST_CONTAINER_FORCEINLINE
inline
void reserve(size_type cnt)
{
const bool value = boost::container::dtl::
@@ -1407,25 +1407,25 @@ class flat_tree
(flat_tree_reserve)(this->m_data.m_seq, cnt, dtl::bool_<value>());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
container_type extract_sequence()
{ return boost::move(m_data.m_seq); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
container_type &get_sequence_ref()
{ return m_data.m_seq; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const container_type &get_sequence_cref() const
{ return m_data.m_seq; }
BOOST_CONTAINER_FORCEINLINE void adopt_sequence_equal(BOOST_RV_REF(container_type) seq)
inline void adopt_sequence_equal(BOOST_RV_REF(container_type) seq)
{
(flat_tree_adopt_sequence_equal)( m_data.m_seq, boost::move(seq), this->priv_value_comp()
, dtl::bool_<is_contiguous_container<container_type>::value>());
}
BOOST_CONTAINER_FORCEINLINE void adopt_sequence_unique(BOOST_RV_REF(container_type) seq)
inline void adopt_sequence_unique(BOOST_RV_REF(container_type) seq)
{
(flat_tree_adopt_sequence_unique)(m_data.m_seq, boost::move(seq), this->priv_value_comp()
, dtl::bool_<is_contiguous_container<container_type>::value>());
@@ -1443,35 +1443,35 @@ class flat_tree
m_data.m_seq = boost::move(seq);
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator==(const flat_tree& x, const flat_tree& y)
{
return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator<(const flat_tree& x, const flat_tree& y)
{
return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator!=(const flat_tree& x, const flat_tree& y)
{ return !(x == y); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator>(const flat_tree& x, const flat_tree& y)
{ return y < x; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator<=(const flat_tree& x, const flat_tree& y)
{ return !(y < x); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator>=(const flat_tree& x, const flat_tree& y)
{ return !(x < y); }
BOOST_CONTAINER_FORCEINLINE friend void swap(flat_tree& x, flat_tree& y)
inline friend void swap(flat_tree& x, flat_tree& y)
BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y)))
{ x.swap(y); }
@@ -1492,7 +1492,7 @@ class flat_tree
}
}
BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
inline bool priv_in_range_or_end(const_iterator pos) const
{
return (this->begin() <= pos) && (pos <= this->end());
}
@@ -1535,7 +1535,7 @@ class flat_tree
return commit_data.position == e || key_cmp(k, KeyOfValue()(*commit_data.position));
}
BOOST_CONTAINER_FORCEINLINE bool priv_insert_unique_prepare
inline bool priv_insert_unique_prepare
(const key_type& k, insert_commit_data &commit_data)
{ return this->priv_insert_unique_prepare(this->cbegin(), this->cend(), k, commit_data); }
@@ -1583,7 +1583,7 @@ class flat_tree
}
template<class Convertible>
BOOST_CONTAINER_FORCEINLINE iterator priv_insert_commit
inline iterator priv_insert_commit
(insert_commit_data &commit_data, BOOST_FWD_REF(Convertible) convertible)
{
return this->m_data.m_seq.insert
+161 -161
View File
@@ -49,125 +49,125 @@ class constant_iterator
typedef constant_iterator<T> this_type;
public:
BOOST_CONTAINER_FORCEINLINE explicit constant_iterator(const T &ref, std::size_t range_size)
inline explicit constant_iterator(const T &ref, std::size_t range_size)
: m_ptr(&ref), m_num(range_size){}
//Constructors
BOOST_CONTAINER_FORCEINLINE constant_iterator()
inline constant_iterator()
: m_ptr(0), m_num(0){}
BOOST_CONTAINER_FORCEINLINE constant_iterator& operator++()
inline constant_iterator& operator++()
{ increment(); return *this; }
BOOST_CONTAINER_FORCEINLINE constant_iterator operator++(int)
inline constant_iterator operator++(int)
{
constant_iterator result (*this);
increment();
return result;
}
BOOST_CONTAINER_FORCEINLINE constant_iterator& operator--()
inline constant_iterator& operator--()
{ decrement(); return *this; }
BOOST_CONTAINER_FORCEINLINE constant_iterator operator--(int)
inline constant_iterator operator--(int)
{
constant_iterator result (*this);
decrement();
return result;
}
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const constant_iterator& i, const constant_iterator& i2)
inline friend bool operator== (const constant_iterator& i, const constant_iterator& i2)
{ return i.equal(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const constant_iterator& i, const constant_iterator& i2)
inline friend bool operator!= (const constant_iterator& i, const constant_iterator& i2)
{ return !(i == i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator< (const constant_iterator& i, const constant_iterator& i2)
inline friend bool operator< (const constant_iterator& i, const constant_iterator& i2)
{ return i.less(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator> (const constant_iterator& i, const constant_iterator& i2)
inline friend bool operator> (const constant_iterator& i, const constant_iterator& i2)
{ return i2 < i; }
BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const constant_iterator& i, const constant_iterator& i2)
inline friend bool operator<= (const constant_iterator& i, const constant_iterator& i2)
{ return !(i > i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const constant_iterator& i, const constant_iterator& i2)
inline friend bool operator>= (const constant_iterator& i, const constant_iterator& i2)
{ return !(i < i2); }
BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const constant_iterator& i, const constant_iterator& i2)
inline friend std::ptrdiff_t operator- (const constant_iterator& i, const constant_iterator& i2)
{ return i2.distance_to(i); }
//Arithmetic signed
BOOST_CONTAINER_FORCEINLINE constant_iterator& operator+=(std::ptrdiff_t off)
inline constant_iterator& operator+=(std::ptrdiff_t off)
{ this->advance(off); return *this; }
BOOST_CONTAINER_FORCEINLINE constant_iterator operator+(std::ptrdiff_t off) const
inline constant_iterator operator+(std::ptrdiff_t off) const
{
constant_iterator other(*this);
other.advance(off);
return other;
}
BOOST_CONTAINER_FORCEINLINE friend constant_iterator operator+(std::ptrdiff_t off, const constant_iterator& right)
inline friend constant_iterator operator+(std::ptrdiff_t off, const constant_iterator& right)
{ return right + off; }
BOOST_CONTAINER_FORCEINLINE constant_iterator& operator-=(std::ptrdiff_t off)
inline constant_iterator& operator-=(std::ptrdiff_t off)
{ this->advance(-off); return *this; }
BOOST_CONTAINER_FORCEINLINE constant_iterator operator-(std::ptrdiff_t off) const
inline constant_iterator operator-(std::ptrdiff_t off) const
{ return *this + (-off); }
BOOST_CONTAINER_FORCEINLINE const T& operator[] (std::ptrdiff_t ) const
inline const T& operator[] (std::ptrdiff_t ) const
{ return dereference(); }
BOOST_CONTAINER_FORCEINLINE const T& operator*() const
inline const T& operator*() const
{ return dereference(); }
BOOST_CONTAINER_FORCEINLINE const T* operator->() const
inline const T* operator->() const
{ return &(dereference()); }
//Arithmetic unsigned
BOOST_CONTAINER_FORCEINLINE constant_iterator& operator+=(std::size_t off)
inline constant_iterator& operator+=(std::size_t off)
{ return *this += std::ptrdiff_t(off); }
BOOST_CONTAINER_FORCEINLINE constant_iterator operator+(std::size_t off) const
inline constant_iterator operator+(std::size_t off) const
{ return *this + std::ptrdiff_t(off); }
BOOST_CONTAINER_FORCEINLINE friend constant_iterator operator+(std::size_t off, const constant_iterator& right)
inline friend constant_iterator operator+(std::size_t off, const constant_iterator& right)
{ return std::ptrdiff_t(off) + right; }
BOOST_CONTAINER_FORCEINLINE constant_iterator& operator-=(std::size_t off)
inline constant_iterator& operator-=(std::size_t off)
{ return *this -= std::ptrdiff_t(off); }
BOOST_CONTAINER_FORCEINLINE constant_iterator operator-(std::size_t off) const
inline constant_iterator operator-(std::size_t off) const
{ return *this - std::ptrdiff_t(off); }
BOOST_CONTAINER_FORCEINLINE const T& operator[] (std::size_t off) const
inline const T& operator[] (std::size_t off) const
{ return (*this)[std::ptrdiff_t(off)]; }
private:
const T * m_ptr;
std::size_t m_num;
BOOST_CONTAINER_FORCEINLINE void increment()
inline void increment()
{ --m_num; }
BOOST_CONTAINER_FORCEINLINE void decrement()
inline void decrement()
{ ++m_num; }
BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
inline bool equal(const this_type &other) const
{ return m_num == other.m_num; }
BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
inline bool less(const this_type &other) const
{ return other.m_num < m_num; }
BOOST_CONTAINER_FORCEINLINE const T & dereference() const
inline const T & dereference() const
{ return *m_ptr; }
BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n)
inline void advance(std::ptrdiff_t n)
{ m_num = std::size_t(std::ptrdiff_t(m_num) - n); }
BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other)const
inline std::ptrdiff_t distance_to(const this_type &other)const
{ return std::ptrdiff_t(m_num - other.m_num); }
};
@@ -179,72 +179,72 @@ class value_init_construct_iterator
typedef value_init_construct_iterator<T> this_type;
public:
BOOST_CONTAINER_FORCEINLINE explicit value_init_construct_iterator(std::size_t range_size)
inline explicit value_init_construct_iterator(std::size_t range_size)
: m_num(range_size){}
//Constructors
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator()
inline value_init_construct_iterator()
: m_num(0){}
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator++()
inline value_init_construct_iterator& operator++()
{ increment(); return *this; }
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator++(int)
inline value_init_construct_iterator operator++(int)
{
value_init_construct_iterator result (*this);
increment();
return result;
}
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator--()
inline value_init_construct_iterator& operator--()
{ decrement(); return *this; }
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator--(int)
inline value_init_construct_iterator operator--(int)
{
value_init_construct_iterator result (*this);
decrement();
return result;
}
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
inline friend bool operator== (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
{ return i.equal(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
inline friend bool operator!= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
{ return !(i == i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator< (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
inline friend bool operator< (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
{ return i.less(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator> (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
inline friend bool operator> (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
{ return i2 < i; }
BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
inline friend bool operator<= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
{ return !(i > i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
inline friend bool operator>= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
{ return !(i < i2); }
BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
inline friend std::ptrdiff_t operator- (const value_init_construct_iterator& i, const value_init_construct_iterator& i2)
{ return i2.distance_to(i); }
//Arithmetic
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator+=(std::ptrdiff_t off)
inline value_init_construct_iterator& operator+=(std::ptrdiff_t off)
{ this->advance(off); return *this; }
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator+(std::ptrdiff_t off) const
inline value_init_construct_iterator operator+(std::ptrdiff_t off) const
{
value_init_construct_iterator other(*this);
other.advance(off);
return other;
}
BOOST_CONTAINER_FORCEINLINE friend value_init_construct_iterator operator+(std::ptrdiff_t off, const value_init_construct_iterator& right)
inline friend value_init_construct_iterator operator+(std::ptrdiff_t off, const value_init_construct_iterator& right)
{ return right + off; }
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator& operator-=(std::ptrdiff_t off)
inline value_init_construct_iterator& operator-=(std::ptrdiff_t off)
{ this->advance(-off); return *this; }
BOOST_CONTAINER_FORCEINLINE value_init_construct_iterator operator-(std::ptrdiff_t off) const
inline value_init_construct_iterator operator-(std::ptrdiff_t off) const
{ return *this + (-off); }
//This pseudo-iterator's dereference operations have no sense since value is not
@@ -257,28 +257,28 @@ class value_init_construct_iterator
private:
std::size_t m_num;
BOOST_CONTAINER_FORCEINLINE void increment()
inline void increment()
{ --m_num; }
BOOST_CONTAINER_FORCEINLINE void decrement()
inline void decrement()
{ ++m_num; }
BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
inline bool equal(const this_type &other) const
{ return m_num == other.m_num; }
BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
inline bool less(const this_type &other) const
{ return other.m_num < m_num; }
BOOST_CONTAINER_FORCEINLINE const T & dereference() const
inline const T & dereference() const
{
static T dummy;
return dummy;
}
BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n)
inline void advance(std::ptrdiff_t n)
{ m_num = std::size_t(std::ptrdiff_t(m_num) - n); }
BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other)const
inline std::ptrdiff_t distance_to(const this_type &other)const
{ return std::ptrdiff_t(m_num - other.m_num); }
};
@@ -290,72 +290,72 @@ class default_init_construct_iterator
typedef default_init_construct_iterator<T> this_type;
public:
BOOST_CONTAINER_FORCEINLINE explicit default_init_construct_iterator(std::size_t range_size)
inline explicit default_init_construct_iterator(std::size_t range_size)
: m_num(range_size){}
//Constructors
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator()
inline default_init_construct_iterator()
: m_num(0){}
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator++()
inline default_init_construct_iterator& operator++()
{ increment(); return *this; }
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator++(int)
inline default_init_construct_iterator operator++(int)
{
default_init_construct_iterator result (*this);
increment();
return result;
}
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator--()
inline default_init_construct_iterator& operator--()
{ decrement(); return *this; }
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator--(int)
inline default_init_construct_iterator operator--(int)
{
default_init_construct_iterator result (*this);
decrement();
return result;
}
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
inline friend bool operator== (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
{ return i.equal(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
inline friend bool operator!= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
{ return !(i == i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator< (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
inline friend bool operator< (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
{ return i.less(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator> (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
inline friend bool operator> (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
{ return i2 < i; }
BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
inline friend bool operator<= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
{ return !(i > i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
inline friend bool operator>= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
{ return !(i < i2); }
BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
inline friend std::ptrdiff_t operator- (const default_init_construct_iterator& i, const default_init_construct_iterator& i2)
{ return i2.distance_to(i); }
//Arithmetic
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator+=(std::ptrdiff_t off)
inline default_init_construct_iterator& operator+=(std::ptrdiff_t off)
{ this->advance(off); return *this; }
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator+(std::ptrdiff_t off) const
inline default_init_construct_iterator operator+(std::ptrdiff_t off) const
{
default_init_construct_iterator other(*this);
other.advance(off);
return other;
}
BOOST_CONTAINER_FORCEINLINE friend default_init_construct_iterator operator+(std::ptrdiff_t off, const default_init_construct_iterator& right)
inline friend default_init_construct_iterator operator+(std::ptrdiff_t off, const default_init_construct_iterator& right)
{ return right + off; }
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator& operator-=(std::ptrdiff_t off)
inline default_init_construct_iterator& operator-=(std::ptrdiff_t off)
{ this->advance(-off); return *this; }
BOOST_CONTAINER_FORCEINLINE default_init_construct_iterator operator-(std::ptrdiff_t off) const
inline default_init_construct_iterator operator-(std::ptrdiff_t off) const
{ return *this + (-off); }
//This pseudo-iterator's dereference operations have no sense since value is not
@@ -368,28 +368,28 @@ class default_init_construct_iterator
private:
std::size_t m_num;
BOOST_CONTAINER_FORCEINLINE void increment()
inline void increment()
{ --m_num; }
BOOST_CONTAINER_FORCEINLINE void decrement()
inline void decrement()
{ ++m_num; }
BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
inline bool equal(const this_type &other) const
{ return m_num == other.m_num; }
BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
inline bool less(const this_type &other) const
{ return other.m_num < m_num; }
BOOST_CONTAINER_FORCEINLINE const T & dereference() const
inline const T & dereference() const
{
static T dummy;
return dummy;
}
BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n)
inline void advance(std::ptrdiff_t n)
{ m_num = std::size_t(std::ptrdiff_t(m_num) - n); }
BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other) const
inline std::ptrdiff_t distance_to(const this_type &other) const
{ return std::ptrdiff_t(m_num - other.m_num); }
};
@@ -401,106 +401,106 @@ class repeat_iterator
{
typedef repeat_iterator<T> this_type;
public:
BOOST_CONTAINER_FORCEINLINE explicit repeat_iterator(T &ref, std::size_t range_size)
inline explicit repeat_iterator(T &ref, std::size_t range_size)
: m_ptr(&ref), m_num(range_size){}
//Constructors
BOOST_CONTAINER_FORCEINLINE repeat_iterator()
inline repeat_iterator()
: m_ptr(0), m_num(0){}
BOOST_CONTAINER_FORCEINLINE this_type& operator++()
inline this_type& operator++()
{ increment(); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator++(int)
inline this_type operator++(int)
{
this_type result (*this);
increment();
return result;
}
BOOST_CONTAINER_FORCEINLINE this_type& operator--()
inline this_type& operator--()
{ increment(); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator--(int)
inline this_type operator--(int)
{
this_type result (*this);
increment();
return result;
}
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2)
inline friend bool operator== (const this_type& i, const this_type& i2)
{ return i.equal(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2)
inline friend bool operator!= (const this_type& i, const this_type& i2)
{ return !(i == i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2)
inline friend bool operator< (const this_type& i, const this_type& i2)
{ return i.less(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2)
inline friend bool operator> (const this_type& i, const this_type& i2)
{ return i2 < i; }
BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2)
inline friend bool operator<= (const this_type& i, const this_type& i2)
{ return !(i > i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2)
inline friend bool operator>= (const this_type& i, const this_type& i2)
{ return !(i < i2); }
BOOST_CONTAINER_FORCEINLINE friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2)
inline friend std::ptrdiff_t operator- (const this_type& i, const this_type& i2)
{ return i2.distance_to(i); }
//Arithmetic
BOOST_CONTAINER_FORCEINLINE this_type& operator+=(std::ptrdiff_t off)
inline this_type& operator+=(std::ptrdiff_t off)
{ this->advance(off); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator+(std::ptrdiff_t off) const
inline this_type operator+(std::ptrdiff_t off) const
{
this_type other(*this);
other.advance(off);
return other;
}
BOOST_CONTAINER_FORCEINLINE friend this_type operator+(std::ptrdiff_t off, const this_type& right)
inline friend this_type operator+(std::ptrdiff_t off, const this_type& right)
{ return right + off; }
BOOST_CONTAINER_FORCEINLINE this_type& operator-=(std::ptrdiff_t off)
inline this_type& operator-=(std::ptrdiff_t off)
{ this->advance(-off); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator-(std::ptrdiff_t off) const
inline this_type operator-(std::ptrdiff_t off) const
{ return *this + (-off); }
BOOST_CONTAINER_FORCEINLINE T& operator*() const
inline T& operator*() const
{ return dereference(); }
BOOST_CONTAINER_FORCEINLINE T& operator[] (std::ptrdiff_t ) const
inline T& operator[] (std::ptrdiff_t ) const
{ return dereference(); }
BOOST_CONTAINER_FORCEINLINE T *operator->() const
inline T *operator->() const
{ return &(dereference()); }
private:
T * m_ptr;
std::size_t m_num;
BOOST_CONTAINER_FORCEINLINE void increment()
inline void increment()
{ --m_num; }
BOOST_CONTAINER_FORCEINLINE void decrement()
inline void decrement()
{ ++m_num; }
BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
inline bool equal(const this_type &other) const
{ return m_num == other.m_num; }
BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
inline bool less(const this_type &other) const
{ return other.m_num < m_num; }
BOOST_CONTAINER_FORCEINLINE T & dereference() const
inline T & dereference() const
{ return *m_ptr; }
BOOST_CONTAINER_FORCEINLINE void advance(std::ptrdiff_t n)
inline void advance(std::ptrdiff_t n)
{ m_num = std::size_t(std::ptrdiff_t(m_num - n)); }
BOOST_CONTAINER_FORCEINLINE std::ptrdiff_t distance_to(const this_type &other)const
inline std::ptrdiff_t distance_to(const this_type &other)const
{ return std::ptrdiff_t(m_num - other.m_num); }
};
@@ -513,71 +513,71 @@ class emplace_iterator
public:
typedef std::ptrdiff_t difference_type;
BOOST_CONTAINER_FORCEINLINE explicit emplace_iterator(EmplaceFunctor&e)
inline explicit emplace_iterator(EmplaceFunctor&e)
: m_num(1), m_pe(&e){}
BOOST_CONTAINER_FORCEINLINE emplace_iterator()
inline emplace_iterator()
: m_num(0), m_pe(0){}
BOOST_CONTAINER_FORCEINLINE this_type& operator++()
inline this_type& operator++()
{ increment(); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator++(int)
inline this_type operator++(int)
{
this_type result (*this);
increment();
return result;
}
BOOST_CONTAINER_FORCEINLINE this_type& operator--()
inline this_type& operator--()
{ decrement(); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator--(int)
inline this_type operator--(int)
{
this_type result (*this);
decrement();
return result;
}
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2)
inline friend bool operator== (const this_type& i, const this_type& i2)
{ return i.equal(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2)
inline friend bool operator!= (const this_type& i, const this_type& i2)
{ return !(i == i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2)
inline friend bool operator< (const this_type& i, const this_type& i2)
{ return i.less(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2)
inline friend bool operator> (const this_type& i, const this_type& i2)
{ return i2 < i; }
BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2)
inline friend bool operator<= (const this_type& i, const this_type& i2)
{ return !(i > i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2)
inline friend bool operator>= (const this_type& i, const this_type& i2)
{ return !(i < i2); }
BOOST_CONTAINER_FORCEINLINE friend difference_type operator- (const this_type& i, const this_type& i2)
inline friend difference_type operator- (const this_type& i, const this_type& i2)
{ return i2.distance_to(i); }
//Arithmetic
BOOST_CONTAINER_FORCEINLINE this_type& operator+=(difference_type off)
inline this_type& operator+=(difference_type off)
{ this->advance(off); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator+(difference_type off) const
inline this_type operator+(difference_type off) const
{
this_type other(*this);
other.advance(off);
return other;
}
BOOST_CONTAINER_FORCEINLINE friend this_type operator+(difference_type off, const this_type& right)
inline friend this_type operator+(difference_type off, const this_type& right)
{ return right + off; }
BOOST_CONTAINER_FORCEINLINE this_type& operator-=(difference_type off)
inline this_type& operator-=(difference_type off)
{ this->advance(-off); return *this; }
BOOST_CONTAINER_FORCEINLINE this_type operator-(difference_type off) const
inline this_type operator-(difference_type off) const
{ return *this + (-off); }
private:
@@ -590,39 +590,39 @@ class emplace_iterator
public:
template<class Allocator>
BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* ptr)
inline void construct_in_place(Allocator &a, T* ptr)
{ (*m_pe)(a, ptr); }
template<class DestIt>
BOOST_CONTAINER_FORCEINLINE void assign_in_place(DestIt dest)
inline void assign_in_place(DestIt dest)
{ (*m_pe)(dest); }
private:
std::size_t m_num;
EmplaceFunctor * m_pe;
BOOST_CONTAINER_FORCEINLINE void increment()
inline void increment()
{ --m_num; }
BOOST_CONTAINER_FORCEINLINE void decrement()
inline void decrement()
{ ++m_num; }
BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const
inline bool equal(const this_type &other) const
{ return m_num == other.m_num; }
BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const
inline bool less(const this_type &other) const
{ return other.m_num < m_num; }
BOOST_CONTAINER_FORCEINLINE const T & dereference() const
inline const T & dereference() const
{
static T dummy;
return dummy;
}
BOOST_CONTAINER_FORCEINLINE void advance(difference_type n)
inline void advance(difference_type n)
{ m_num -= n; }
BOOST_CONTAINER_FORCEINLINE difference_type distance_to(const this_type &other)const
inline difference_type distance_to(const this_type &other)const
{ return difference_type(m_num - other.m_num); }
};
@@ -633,28 +633,28 @@ struct emplace_functor
{
typedef typename dtl::build_number_seq<sizeof...(Args)>::type index_tuple_t;
BOOST_CONTAINER_FORCEINLINE emplace_functor(BOOST_FWD_REF(Args)... args)
inline emplace_functor(BOOST_FWD_REF(Args)... args)
: args_(args...)
{}
template<class Allocator, class T>
BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr)
inline void operator()(Allocator &a, T *ptr)
{ emplace_functor::inplace_impl(a, ptr, index_tuple_t()); }
template<class DestIt>
BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest)
inline void operator()(DestIt dest)
{ emplace_functor::inplace_impl(dest, index_tuple_t()); }
private:
template<class Allocator, class T, std::size_t ...IdxPack>
BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple<IdxPack...>&)
inline void inplace_impl(Allocator &a, T* ptr, const dtl::index_tuple<IdxPack...>&)
{
allocator_traits<Allocator>::construct
(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 dtl::index_tuple<IdxPack...>&)
inline 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>(dtl::get<IdxPack>(args_))...);
@@ -680,15 +680,15 @@ struct emplace_functor_type;
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
struct emplace_functor##N\
{\
BOOST_CONTAINER_FORCEINLINE explicit emplace_functor##N( BOOST_MOVE_UREF##N )\
inline explicit emplace_functor##N( BOOST_MOVE_UREF##N )\
BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N{}\
\
template<class Allocator, class T>\
BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr)\
inline void operator()(Allocator &a, T *ptr)\
{ allocator_traits<Allocator>::construct(a, ptr BOOST_MOVE_I##N BOOST_MOVE_MFWD##N); }\
\
template<class DestIt>\
BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest)\
inline 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), dtl::value_init<value_type> tmp) ;\
@@ -836,62 +836,62 @@ class iterator_from_iiterator
typedef typename types_t::iterator_category iterator_category;
typedef typename types_t::value_type value_type;
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator()
inline iterator_from_iiterator()
: m_iit()
{}
BOOST_CONTAINER_FORCEINLINE explicit iterator_from_iiterator(IIterator iit) BOOST_NOEXCEPT_OR_NOTHROW
inline explicit iterator_from_iiterator(IIterator iit) BOOST_NOEXCEPT_OR_NOTHROW
: m_iit(iit)
{}
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW
inline iterator_from_iiterator(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW
: m_iit(other.get())
{}
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
inline iterator_from_iiterator(const nonconst_iterator& other) BOOST_NOEXCEPT_OR_NOTHROW
: m_iit(other.get())
{}
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator=(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW
inline iterator_from_iiterator& operator=(const iterator_from_iiterator& other) BOOST_NOEXCEPT_OR_NOTHROW
{ m_iit = other.get(); return *this; }
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
inline iterator_from_iiterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
{ ++this->m_iit; return *this; }
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
inline iterator_from_iiterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
{
iterator_from_iiterator result (*this);
++this->m_iit;
return result;
}
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
inline iterator_from_iiterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
{
//If the iterator_from_iiterator is not a bidirectional iterator, operator-- should not exist
BOOST_STATIC_ASSERT((is_bidirectional_iterator<iterator_from_iiterator>::value));
--this->m_iit; return *this;
}
BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
inline iterator_from_iiterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
{
iterator_from_iiterator result (*this);
--this->m_iit;
return result;
}
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
inline friend bool operator== (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_iit == r.m_iit; }
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
inline friend bool operator!= (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW
{ return l.m_iit != r.m_iit; }
BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
inline reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->m_iit->get_data(); }
BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
inline pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
{ return ::boost::intrusive::pointer_traits<pointer>::pointer_to(this->operator*()); }
BOOST_CONTAINER_FORCEINLINE const IIterator &get() const BOOST_NOEXCEPT_OR_NOTHROW
inline const IIterator &get() const BOOST_NOEXCEPT_OR_NOTHROW
{ return this->m_iit; }
private:
@@ -80,11 +80,11 @@ struct growth_factor_100
{};
template<class SizeType>
BOOST_CONTAINER_FORCEINLINE void clamp_by_stored_size_type(SizeType &, SizeType)
inline void clamp_by_stored_size_type(SizeType &, SizeType)
{}
template<class SizeType, class SomeStoredSizeType>
BOOST_CONTAINER_FORCEINLINE void clamp_by_stored_size_type(SizeType &s, SomeStoredSizeType)
inline void clamp_by_stored_size_type(SizeType &s, SomeStoredSizeType)
{
if (s >= SomeStoredSizeType(-1) )
s = SomeStoredSizeType(-1);
@@ -118,16 +118,16 @@ struct base_node
::boost::container::construct_in_place(a, &this->get_real_data(), it);
}
BOOST_CONTAINER_FORCEINLINE T &get_data()
inline T &get_data()
{ return *move_detail::force_ptr<T*>(this->m_storage.data); }
BOOST_CONTAINER_FORCEINLINE const T &get_data() const
inline const T &get_data() const
{ return *move_detail::force_ptr<const T*>(this->m_storage.data); }
BOOST_CONTAINER_FORCEINLINE internal_type &get_real_data()
inline internal_type &get_real_data()
{ return *move_detail::force_ptr<internal_type*>(this->m_storage.data); }
BOOST_CONTAINER_FORCEINLINE const internal_type &get_real_data() const
inline const internal_type &get_real_data() const
{ return *move_detail::force_ptr<const internal_type*>(this->m_storage.data); }
#if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING)
@@ -136,7 +136,7 @@ struct base_node
# endif
template<class Alloc>
BOOST_CONTAINER_FORCEINLINE void destructor(Alloc &a) BOOST_NOEXCEPT
inline void destructor(Alloc &a) BOOST_NOEXCEPT
{
allocator_traits<Alloc>::destroy
(a, &this->get_real_data());
@@ -144,7 +144,7 @@ struct base_node
}
template<class Pair>
BOOST_CONTAINER_FORCEINLINE
inline
typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
do_assign(const Pair &p)
{
@@ -154,13 +154,13 @@ struct base_node
}
template<class V>
BOOST_CONTAINER_FORCEINLINE
inline
typename dtl::disable_if< dtl::is_pair<V>, void >::type
do_assign(const V &v)
{ this->get_real_data() = v; }
template<class Pair>
BOOST_CONTAINER_FORCEINLINE
inline
typename dtl::enable_if< dtl::is_pair<Pair>, void >::type
do_move_assign(Pair &p)
{
@@ -170,7 +170,7 @@ struct base_node
}
template<class V>
BOOST_CONTAINER_FORCEINLINE
inline
typename dtl::disable_if< dtl::is_pair<V>, void >::type
do_move_assign(V &v)
{ this->get_real_data() = ::boost::move(v); }
@@ -178,7 +178,7 @@ struct base_node
private:
base_node();
BOOST_CONTAINER_FORCEINLINE ~base_node()
inline ~base_node()
{ }
};
@@ -256,7 +256,7 @@ struct node_alloc_holder
public:
//Constructors for sequence containers
BOOST_CONTAINER_FORCEINLINE node_alloc_holder()
inline node_alloc_holder()
{}
explicit node_alloc_holder(const intrusive_bucket_traits& bt)
@@ -339,30 +339,30 @@ struct node_alloc_holder
, typename ICont::key_equal(eql))
{ this->icont().swap(BOOST_MOVE_TO_LV(x).icont()); }
BOOST_CONTAINER_FORCEINLINE void copy_assign_alloc(const node_alloc_holder &x)
inline void copy_assign_alloc(const node_alloc_holder &x)
{
dtl::bool_<allocator_traits_type::propagate_on_container_copy_assignment::value> flag;
dtl::assign_alloc( static_cast<NodeAlloc &>(*this)
, static_cast<const NodeAlloc &>(x), flag);
}
BOOST_CONTAINER_FORCEINLINE void move_assign_alloc( node_alloc_holder &x)
inline void move_assign_alloc( node_alloc_holder &x)
{
dtl::bool_<allocator_traits_type::propagate_on_container_move_assignment::value> flag;
dtl::move_alloc( static_cast<NodeAlloc &>(*this)
, static_cast<NodeAlloc &>(x), flag);
}
BOOST_CONTAINER_FORCEINLINE ~node_alloc_holder()
inline ~node_alloc_holder()
{ this->clear(alloc_version()); }
BOOST_CONTAINER_FORCEINLINE size_type max_size() const
inline size_type max_size() const
{ return allocator_traits_type::max_size(this->node_alloc()); }
BOOST_CONTAINER_FORCEINLINE NodePtr allocate_one()
inline NodePtr allocate_one()
{ return AllocVersionTraits::allocate_one(this->node_alloc()); }
BOOST_CONTAINER_FORCEINLINE void deallocate_one(const NodePtr &p)
inline void deallocate_one(const NodePtr &p)
{ AllocVersionTraits::deallocate_one(this->node_alloc(), p); }
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
@@ -497,7 +497,7 @@ struct node_alloc_holder
}
}
BOOST_CONTAINER_FORCEINLINE void clear(version_1)
inline void clear(version_1)
{ this->icont().clear_and_dispose(Destroyer(this->node_alloc())); }
void clear(version_2)
@@ -524,11 +524,11 @@ struct node_alloc_holder
}
template<class Key>
BOOST_CONTAINER_FORCEINLINE size_type erase_key(const Key& k, version_1)
inline size_type erase_key(const Key& k, version_1)
{ return this->icont().erase_and_dispose(k, Destroyer(this->node_alloc())); }
template<class Key>
BOOST_CONTAINER_FORCEINLINE size_type erase_key(const Key& k, version_2)
inline size_type erase_key(const Key& k, version_2)
{
allocator_multialloc_chain_node_deallocator<NodeAlloc> chain_holder(this->node_alloc());
return this->icont().erase_and_dispose(k, chain_holder.get_chain_builder());
@@ -537,11 +537,11 @@ struct node_alloc_holder
protected:
struct cloner
{
BOOST_CONTAINER_FORCEINLINE explicit cloner(node_alloc_holder &holder)
inline explicit cloner(node_alloc_holder &holder)
: m_holder(holder)
{}
BOOST_CONTAINER_FORCEINLINE NodePtr operator()(const Node &other) const
inline NodePtr operator()(const Node &other) const
{ return m_holder.create_node(other.get_real_data()); }
node_alloc_holder &m_holder;
@@ -549,11 +549,11 @@ struct node_alloc_holder
struct move_cloner
{
BOOST_CONTAINER_FORCEINLINE move_cloner(node_alloc_holder &holder)
inline move_cloner(node_alloc_holder &holder)
: m_holder(holder)
{}
BOOST_CONTAINER_FORCEINLINE NodePtr operator()(Node &other)
inline NodePtr operator()(Node &other)
{ //Use get_real_data() instead of get_real_data to allow moving const key in [multi]map
return m_holder.create_node(::boost::move(other.get_real_data()));
}
@@ -561,20 +561,20 @@ struct node_alloc_holder
node_alloc_holder &m_holder;
};
BOOST_CONTAINER_FORCEINLINE ICont &non_const_icont() const
inline ICont &non_const_icont() const
{ return const_cast<ICont&>(this->m_icont); }
BOOST_CONTAINER_FORCEINLINE NodeAlloc &node_alloc()
inline NodeAlloc &node_alloc()
{ return static_cast<NodeAlloc &>(*this); }
BOOST_CONTAINER_FORCEINLINE const NodeAlloc &node_alloc() const
inline const NodeAlloc &node_alloc() const
{ return static_cast<const NodeAlloc &>(*this); }
public:
BOOST_CONTAINER_FORCEINLINE ICont &icont()
inline ICont &icont()
{ return this->m_icont; }
BOOST_CONTAINER_FORCEINLINE const ICont &icont() const
inline const ICont &icont() const
{ return this->m_icont; }
protected:
@@ -587,10 +587,10 @@ struct key_of_node : KeyOfValue
{
typedef typename KeyOfValue::type type;
BOOST_CONTAINER_FORCEINLINE key_of_node()
inline key_of_node()
{}
BOOST_CONTAINER_FORCEINLINE const type& operator()(const Node& x) const
inline const type& operator()(const Node& x) const
{ return this->KeyOfValue::operator()(x.get_data()); }
};
@@ -84,21 +84,21 @@ class private_node_pool_impl
{}
//!Destructor. Deallocates all allocated blocks. Never throws
BOOST_CONTAINER_FORCEINLINE ~private_node_pool_impl()
inline ~private_node_pool_impl()
{ this->purge_blocks(); }
BOOST_CONTAINER_FORCEINLINE size_type get_real_num_node() const
inline size_type get_real_num_node() const
{ return m_nodes_per_block; }
//!Returns the segment manager. Never throws
BOOST_CONTAINER_FORCEINLINE segment_manager_base_type* get_segment_manager_base()const
inline segment_manager_base_type* get_segment_manager_base()const
{ return boost::movelib::to_raw_pointer(mp_segment_mngr_base); }
BOOST_CONTAINER_FORCEINLINE void *allocate_node()
inline void *allocate_node()
{ return this->priv_alloc_node(); }
//!Deallocates an array pointed by ptr. Never throws
BOOST_CONTAINER_FORCEINLINE void deallocate_node(void *ptr)
inline void deallocate_node(void *ptr)
{ this->priv_dealloc_node(ptr); }
//!Allocates a singly linked list of n nodes ending in null pointer.
@@ -205,7 +205,7 @@ class private_node_pool_impl
, backup_list.size());
}
BOOST_CONTAINER_FORCEINLINE size_type num_free_nodes()
inline size_type num_free_nodes()
{ return m_freelist.size(); }
//!Deallocates all used memory. Precondition: all nodes allocated from this pool should
@@ -33,13 +33,13 @@ namespace container {
template <class PseudoReference>
struct operator_arrow_proxy
{
BOOST_CONTAINER_FORCEINLINE operator_arrow_proxy(const PseudoReference &px)
inline operator_arrow_proxy(const PseudoReference &px)
: m_value(px)
{}
typedef PseudoReference element_type;
BOOST_CONTAINER_FORCEINLINE PseudoReference* operator->() const { return &m_value; }
inline PseudoReference* operator->() const { return &m_value; }
mutable PseudoReference m_value;
};
@@ -47,13 +47,13 @@ struct operator_arrow_proxy
template <class T>
struct operator_arrow_proxy<T&>
{
BOOST_CONTAINER_FORCEINLINE operator_arrow_proxy(T &px)
inline operator_arrow_proxy(T &px)
: m_value(px)
{}
typedef T element_type;
BOOST_CONTAINER_FORCEINLINE T* operator->() const { return const_cast<T*>(&m_value); }
inline T* operator->() const { return const_cast<T*>(&m_value); }
T &m_value;
};
@@ -69,29 +69,29 @@ class transform_iterator
, typename UnaryFunction::result_type>
{
public:
BOOST_CONTAINER_FORCEINLINE explicit transform_iterator(const Iterator &it, const UnaryFunction &f = UnaryFunction())
inline explicit transform_iterator(const Iterator &it, const UnaryFunction &f = UnaryFunction())
: UnaryFunction(f), m_it(it)
{}
BOOST_CONTAINER_FORCEINLINE explicit transform_iterator()
inline explicit transform_iterator()
: UnaryFunction(), m_it()
{}
//Constructors
BOOST_CONTAINER_FORCEINLINE transform_iterator& operator++()
inline transform_iterator& operator++()
{ increment(); return *this; }
BOOST_CONTAINER_FORCEINLINE transform_iterator operator++(int)
inline transform_iterator operator++(int)
{
transform_iterator result (*this);
increment();
return result;
}
BOOST_CONTAINER_FORCEINLINE friend bool operator== (const transform_iterator& i, const transform_iterator& i2)
inline friend bool operator== (const transform_iterator& i, const transform_iterator& i2)
{ return i.equal(i2); }
BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const transform_iterator& i, const transform_iterator& i2)
inline friend bool operator!= (const transform_iterator& i, const transform_iterator& i2)
{ return !(i == i2); }
/*
@@ -104,69 +104,69 @@ class transform_iterator
friend bool operator>= (const transform_iterator& i, const transform_iterator& i2)
{ return !(i < i2); }
*/
BOOST_CONTAINER_FORCEINLINE friend typename Iterator::difference_type operator- (const transform_iterator& i, const transform_iterator& i2)
inline friend typename Iterator::difference_type operator- (const transform_iterator& i, const transform_iterator& i2)
{ return i2.distance_to(i); }
//Arithmetic
BOOST_CONTAINER_FORCEINLINE transform_iterator& operator+=(typename Iterator::difference_type off)
inline transform_iterator& operator+=(typename Iterator::difference_type off)
{ this->advance(off); return *this; }
BOOST_CONTAINER_FORCEINLINE transform_iterator operator+(typename Iterator::difference_type off) const
inline transform_iterator operator+(typename Iterator::difference_type off) const
{
transform_iterator other(*this);
other.advance(off);
return other;
}
BOOST_CONTAINER_FORCEINLINE friend transform_iterator operator+(typename Iterator::difference_type off, const transform_iterator& right)
inline friend transform_iterator operator+(typename Iterator::difference_type off, const transform_iterator& right)
{ return right + off; }
BOOST_CONTAINER_FORCEINLINE transform_iterator& operator-=(typename Iterator::difference_type off)
inline transform_iterator& operator-=(typename Iterator::difference_type off)
{ this->advance(-off); return *this; }
BOOST_CONTAINER_FORCEINLINE transform_iterator operator-(typename Iterator::difference_type off) const
inline transform_iterator operator-(typename Iterator::difference_type off) const
{ return *this + (-off); }
BOOST_CONTAINER_FORCEINLINE typename UnaryFunction::result_type operator*() const
inline typename UnaryFunction::result_type operator*() const
{ return dereference(); }
BOOST_CONTAINER_FORCEINLINE operator_arrow_proxy<typename UnaryFunction::result_type>
inline operator_arrow_proxy<typename UnaryFunction::result_type>
operator->() const
{ return operator_arrow_proxy<typename UnaryFunction::result_type>(dereference()); }
BOOST_CONTAINER_FORCEINLINE Iterator & base()
inline Iterator & base()
{ return m_it; }
BOOST_CONTAINER_FORCEINLINE const Iterator & base() const
inline const Iterator & base() const
{ return m_it; }
private:
Iterator m_it;
BOOST_CONTAINER_FORCEINLINE void increment()
inline void increment()
{ ++m_it; }
BOOST_CONTAINER_FORCEINLINE void decrement()
inline void decrement()
{ --m_it; }
BOOST_CONTAINER_FORCEINLINE bool equal(const transform_iterator &other) const
inline bool equal(const transform_iterator &other) const
{ return m_it == other.m_it; }
BOOST_CONTAINER_FORCEINLINE bool less(const transform_iterator &other) const
inline bool less(const transform_iterator &other) const
{ return other.m_it < m_it; }
BOOST_CONTAINER_FORCEINLINE typename UnaryFunction::result_type dereference() const
inline typename UnaryFunction::result_type dereference() const
{ return UnaryFunction::operator()(*m_it); }
BOOST_CONTAINER_FORCEINLINE void advance(typename Iterator::difference_type n)
inline void advance(typename Iterator::difference_type n)
{ boost::container::iterator_advance(m_it, n); }
BOOST_CONTAINER_FORCEINLINE typename Iterator::difference_type distance_to(const transform_iterator &other)const
inline typename Iterator::difference_type distance_to(const transform_iterator &other)const
{ return boost::container::iterator_distance(other.m_it, m_it); }
};
template <class Iterator, class UnaryFunc>
BOOST_CONTAINER_FORCEINLINE transform_iterator<Iterator, UnaryFunc>
inline transform_iterator<Iterator, UnaryFunc>
make_transform_iterator(Iterator it, UnaryFunc fun)
{
return transform_iterator<Iterator, UnaryFunc>(it, fun);
+77 -77
View File
@@ -131,11 +131,11 @@ class insert_equal_end_hint_functor
Icont &icont_;
public:
BOOST_CONTAINER_FORCEINLINE insert_equal_end_hint_functor(Icont &icont)
inline insert_equal_end_hint_functor(Icont &icont)
: icont_(icont)
{}
BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
inline void operator()(Node &n)
{ this->icont_.insert_equal(this->icont_.cend(), n); }
};
@@ -145,11 +145,11 @@ class push_back_functor
Icont &icont_;
public:
BOOST_CONTAINER_FORCEINLINE push_back_functor(Icont &icont)
inline push_back_functor(Icont &icont)
: icont_(icont)
{}
BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
inline void operator()(Node &n)
{ this->icont_.push_back(n); }
};
@@ -267,14 +267,14 @@ template< boost::container::tree_type_enum tree_type_value
struct intrusive_tree_proxy
{
template<class Icont>
BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &) {}
inline static void rebalance(Icont &) {}
};
template<boost::container::tree_type_enum tree_type_value>
struct intrusive_tree_proxy<tree_type_value, true>
{
template<class Icont>
BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &c)
inline static void rebalance(Icont &c)
{ c.rebalance(); }
};
@@ -298,10 +298,10 @@ class RecyclingCloner
: m_holder(holder), m_icont(itree)
{}
BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type p, node_t &other, bool_<true>)
inline static void do_assign(node_ptr_type p, node_t &other, bool_<true>)
{ p->do_move_assign(other.get_real_data()); }
BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type p, const node_t &other, bool_<false>)
inline static void do_assign(node_ptr_type p, const node_t &other, bool_<false>)
{ p->do_assign(other.get_real_data()); }
node_ptr_type operator()
@@ -461,19 +461,19 @@ class tree
public:
BOOST_CONTAINER_FORCEINLINE tree()
inline tree()
: AllocHolder()
{}
BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp)
inline explicit tree(const key_compare& comp)
: AllocHolder(ValComp(comp))
{}
BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a)
inline explicit tree(const key_compare& comp, const allocator_type& a)
: AllocHolder(ValComp(comp), a)
{}
BOOST_CONTAINER_FORCEINLINE explicit tree(const allocator_type& a)
inline explicit tree(const allocator_type& a)
: AllocHolder(a)
{}
@@ -616,19 +616,19 @@ class tree
public:
BOOST_CONTAINER_FORCEINLINE tree(const tree& x)
inline tree(const tree& x)
: AllocHolder(x, x.value_comp())
{
this->icont().clone_from
(x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
}
BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x)
inline tree(BOOST_RV_REF(tree) x)
BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
: AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp())
{}
BOOST_CONTAINER_FORCEINLINE tree(const tree& x, const allocator_type &a)
inline tree(const tree& x, const allocator_type &a)
: AllocHolder(x.value_comp(), a)
{
this->icont().clone_from
@@ -649,7 +649,7 @@ class tree
//AllocHolder clears in case of exception
}
BOOST_CONTAINER_FORCEINLINE ~tree()
inline ~tree()
{} //AllocHolder clears the tree
tree& operator=(BOOST_COPY_ASSIGN_REF(tree) x)
@@ -729,56 +729,56 @@ class tree
public:
// accessors:
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
value_compare value_comp() const
{ return value_compare(this->key_comp()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
key_compare key_comp() const
{ return this->icont().key_comp(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
allocator_type get_allocator() const
{ return allocator_type(this->node_alloc()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const stored_allocator_type &get_stored_allocator() const
{ return this->node_alloc(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
stored_allocator_type &get_stored_allocator()
{ return this->node_alloc(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator begin()
{ return iterator(this->icont().begin()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator begin() const
{ return this->cbegin(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator end()
{ return iterator(this->icont().end()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator end() const
{ return this->cend(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reverse_iterator rbegin()
{ return reverse_iterator(end()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator rbegin() const
{ return this->crbegin(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
reverse_iterator rend()
{ return reverse_iterator(begin()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator rend() const
{ return this->crend(); }
@@ -787,7 +787,7 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator cbegin() const
{ return const_iterator(this->non_const_icont().begin()); }
@@ -796,7 +796,7 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator cend() const
{ return const_iterator(this->non_const_icont().end()); }
@@ -806,7 +806,7 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator crbegin() const
{ return const_reverse_iterator(cend()); }
@@ -816,23 +816,23 @@ class tree
//! <b>Throws</b>: Nothing.
//!
//! <b>Complexity</b>: Constant.
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_reverse_iterator crend() const
{ return const_reverse_iterator(cbegin()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
bool empty() const
{ return !this->size(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type size() const
{ return this->icont().size(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type max_size() const
{ return AllocHolder::max_size(); }
BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x)
inline void swap(ThisType& x)
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
&& boost::container::dtl::is_nothrow_swappable<Compare>::value )
{ AllocHolder::swap(x); }
@@ -962,11 +962,11 @@ class tree
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
template <class... Args>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
inline std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
{ return this->emplace_unique_node(AllocHolder::create_node(boost::forward<Args>(args)...)); }
template <class... Args>
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
inline iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
{ return this->emplace_hint_unique_node(hint, AllocHolder::create_node(boost::forward<Args>(args)...)); }
template <class... Args>
@@ -991,7 +991,7 @@ class tree
}
template <class KeyType, class... Args>
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
inline std::pair<iterator, bool> try_emplace
(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
{
insert_commit_data data;
@@ -1039,7 +1039,7 @@ class tree
}\
\
template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
inline std::pair<iterator, bool>\
try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
{\
insert_commit_data data;\
@@ -1122,7 +1122,7 @@ class tree
return iterator(this->icont().erase_and_dispose(position.get(), Destroyer(this->node_alloc())));
}
BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& k)
inline size_type erase(const key_type& k)
{ return AllocHolder::erase_key(k, alloc_version()); }
size_type erase_unique(const key_type& k)
@@ -1209,105 +1209,105 @@ class tree
}
template<class C2>
BOOST_CONTAINER_FORCEINLINE void merge_unique(tree<T, KeyOfValue, C2, Allocator, Options>& source)
inline void merge_unique(tree<T, KeyOfValue, C2, Allocator, Options>& source)
{ return this->icont().merge_unique(source.icont()); }
template<class C2>
BOOST_CONTAINER_FORCEINLINE void merge_equal(tree<T, KeyOfValue, C2, Allocator, Options>& source)
inline void merge_equal(tree<T, KeyOfValue, C2, Allocator, Options>& source)
{ return this->icont().merge_equal(source.icont()); }
BOOST_CONTAINER_FORCEINLINE void clear()
inline void clear()
{ AllocHolder::clear(alloc_version()); }
// search operations. Const and non-const overloads even if no iterator is returned
// so splay implementations can to their rebalancing when searching in non-const versions
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator find(const key_type& k)
{ return iterator(this->icont().find(k)); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator find(const key_type& k) const
{ return const_iterator(this->non_const_icont().find(k)); }
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
find(const K& k)
{ return iterator(this->icont().find(k, KeyNodeCompare())); }
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
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())); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
size_type count(const key_type& k) const
{ return size_type(this->icont().count(k)); }
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, size_type>::type
count(const K& k) const
{ return size_type(this->icont().count(k, KeyNodeCompare())); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
bool contains(const key_type& x) const
{ return this->find(x) != this->cend(); }
template<typename K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, bool>::type
contains(const K& x) const
{ return this->find(x) != this->cend(); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator lower_bound(const key_type& k)
{ return iterator(this->icont().lower_bound(k)); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator lower_bound(const key_type& k) const
{ return const_iterator(this->non_const_icont().lower_bound(k)); }
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
lower_bound(const K& k)
{ return iterator(this->icont().lower_bound(k, KeyNodeCompare())); }
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
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())); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
iterator upper_bound(const key_type& k)
{ return iterator(this->icont().upper_bound(k)); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
const_iterator upper_bound(const key_type& k) const
{ return const_iterator(this->non_const_icont().upper_bound(k)); }
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, iterator>::type
upper_bound(const K& k)
{ return iterator(this->icont().upper_bound(k, KeyNodeCompare())); }
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
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())); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<iterator,iterator> equal_range(const key_type& k)
{
std::pair<iiterator, iiterator> ret = this->icont().equal_range(k);
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
{
std::pair<iiterator, iiterator> ret =
@@ -1317,7 +1317,7 @@ class tree
}
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
equal_range(const K& k)
{
@@ -1327,7 +1327,7 @@ class tree
}
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
equal_range(const K& k) const
{
@@ -1337,7 +1337,7 @@ class tree
(const_iterator(ret.first), const_iterator(ret.second));
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<iterator,iterator> lower_bound_range(const key_type& k)
{
std::pair<iiterator, iiterator> ret =
@@ -1345,7 +1345,7 @@ class tree
return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
}
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
{
std::pair<iiterator, iiterator> ret =
@@ -1355,7 +1355,7 @@ class tree
}
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
lower_bound_range(const K& k)
{
@@ -1365,7 +1365,7 @@ class tree
}
template <class K>
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
lower_bound_range(const K& k) const
{
@@ -1375,34 +1375,34 @@ class tree
(const_iterator(ret.first), const_iterator(ret.second));
}
BOOST_CONTAINER_FORCEINLINE void rebalance()
inline void rebalance()
{ intrusive_tree_proxy_t::rebalance(this->icont()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator==(const tree& x, const tree& y)
{ return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator<(const tree& x, const tree& y)
{ return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator!=(const tree& x, const tree& y)
{ return !(x == y); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator>(const tree& x, const tree& y)
{ return y < x; }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator<=(const tree& x, const tree& y)
{ return !(y < x); }
BOOST_CONTAINER_ATTRIBUTE_NODISCARD BOOST_CONTAINER_FORCEINLINE
BOOST_CONTAINER_ATTRIBUTE_NODISCARD inline
friend bool operator>=(const tree& x, const tree& y)
{ return !(x < y); }
BOOST_CONTAINER_FORCEINLINE friend void swap(tree& x, tree& y)
inline friend void swap(tree& x, tree& y)
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
&& boost::container::dtl::is_nothrow_swappable<Compare>::value )
{ x.swap(y); }
@@ -31,13 +31,13 @@ namespace dtl {
template<class T>
struct value_init
{
value_init()
BOOST_CONTAINER_FORCEINLINE value_init()
: m_t()
{}
operator T &() { return m_t; }
BOOST_CONTAINER_FORCEINLINE operator T &() { return m_t; }
T &get() { return m_t; }
BOOST_CONTAINER_FORCEINLINE T &get() { return m_t; }
T m_t;
};