Rewritten hash semi-intrusive containers to improve compilation times and runtime performance. Added experimental "linear_buckets" option.

This commit is contained in:
Ion Gaztañaga committed 2022-05-04 23:36:34 +02:00
1 parent d376c8b453
commit 3c5c8cec3f
17 files changed
+1390 -941

No files matched your search

@@ -52,37 +52,6 @@ class exception_disposer
}
};
template<class Container, class Disposer, class SizeType>
class exception_array_disposer
{
Container *cont_;
Disposer &disp_;
SizeType &constructed_;
exception_array_disposer(const exception_array_disposer&);
exception_array_disposer &operator=(const exception_array_disposer&);
public:
exception_array_disposer
(Container &cont, Disposer &disp, SizeType &constructed)
: cont_(&cont), disp_(disp), constructed_(constructed)
{}
BOOST_INTRUSIVE_FORCEINLINE void release()
{ cont_ = 0; }
~exception_array_disposer()
{
SizeType n = constructed_;
if(cont_){
while(n--){
cont_[n].clear_and_dispose(disp_);
}
}
}
};
} //namespace detail{
} //namespace intrusive{
} //namespace boost{
+182 -98
View File
@@ -26,7 +26,10 @@
#include <boost/intrusive/pointer_traits.hpp>
#include <boost/intrusive/detail/mpl.hpp>
#include <boost/intrusive/trivial_value_traits.hpp>
#include <boost/intrusive/slist.hpp> //make_slist
#include <boost/intrusive/detail/common_slist_algorithms.hpp>
#include <boost/intrusive/detail/iiterator.hpp>
#include <boost/intrusive/detail/slist_iterator.hpp>
#include <boost/move/detail/to_raw_pointer.hpp>
#include <cstddef>
#include <climits>
#include <boost/move/core.hpp>
@@ -35,10 +38,20 @@
namespace boost {
namespace intrusive {
template <class Slist>
struct bucket_impl : public Slist
template <class NodeTraits>
struct bucket_impl
: public NodeTraits::node
{
typedef Slist slist_type;
public:
typedef NodeTraits node_traits;
private:
typedef typename node_traits::node_ptr node_ptr;
typedef typename node_traits::const_node_ptr const_node_ptr;
typedef detail::common_slist_algorithms<NodeTraits> algo_t;
public:
BOOST_INTRUSIVE_FORCEINLINE bucket_impl()
{}
@@ -46,68 +59,22 @@ struct bucket_impl : public Slist
{}
BOOST_INTRUSIVE_FORCEINLINE ~bucket_impl()
{
//This bucket is still being used!
BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
}
{}
BOOST_INTRUSIVE_FORCEINLINE bucket_impl &operator=(const bucket_impl&)
{
//This bucket is still in use!
BOOST_INTRUSIVE_INVARIANT_ASSERT(Slist::empty());
return *this;
}
{ return *this; }
BOOST_INTRUSIVE_FORCEINLINE node_ptr get_node_ptr()
{ return pointer_traits<node_ptr>::pointer_to(*this); }
BOOST_INTRUSIVE_FORCEINLINE const_node_ptr get_node_ptr() const
{ return pointer_traits<const_node_ptr>::pointer_to(*this); }
BOOST_INTRUSIVE_FORCEINLINE node_ptr begin_ptr()
{ return node_traits::get_next(get_node_ptr()); }
};
template<class Slist>
struct bucket_traits_impl
{
private:
BOOST_COPYABLE_AND_MOVABLE(bucket_traits_impl)
public:
/// @cond
typedef typename pointer_traits
<typename Slist::pointer>::template rebind_pointer
< bucket_impl<Slist> >::type bucket_ptr;
typedef Slist slist;
typedef typename Slist::size_type size_type;
/// @endcond
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(bucket_ptr buckets, size_type len)
: buckets_(buckets), buckets_len_(len)
{}
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(const bucket_traits_impl &x)
: buckets_(x.buckets_), buckets_len_(x.buckets_len_)
{}
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl(BOOST_RV_REF(bucket_traits_impl) x)
: buckets_(x.buckets_), buckets_len_(x.buckets_len_)
{ x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; }
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_RV_REF(bucket_traits_impl) x)
{
buckets_ = x.buckets_; buckets_len_ = x.buckets_len_;
x.buckets_ = bucket_ptr(); x.buckets_len_ = 0; return *this;
}
BOOST_INTRUSIVE_FORCEINLINE bucket_traits_impl& operator=(BOOST_COPY_ASSIGN_REF(bucket_traits_impl) x)
{
buckets_ = x.buckets_; buckets_len_ = x.buckets_len_; return *this;
}
BOOST_INTRUSIVE_FORCEINLINE bucket_ptr bucket_begin() const
{ return buckets_; }
BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const BOOST_NOEXCEPT
{ return buckets_len_; }
private:
bucket_ptr buckets_;
size_type buckets_len_;
};
template <class NodeTraits>
struct hash_reduced_slist_node_traits
@@ -133,22 +100,7 @@ struct reduced_slist_node_traits
>::type type;
};
template<class NodeTraits>
struct get_slist_impl
{
typedef trivial_value_traits<NodeTraits, normal_link> trivial_traits;
//Reducing symbol length
struct type : make_slist
< typename NodeTraits::node
, boost::intrusive::value_traits<trivial_traits>
, boost::intrusive::constant_time_size<false>
, boost::intrusive::size_type<std::size_t>
>::type
{};
};
template<class BucketValueTraits, bool IsConst>
template<class BucketValueTraits, bool LinearBuckets, bool IsConst>
class hashtable_iterator
{
typedef typename BucketValueTraits::value_traits value_traits;
@@ -166,24 +118,25 @@ class hashtable_iterator
private:
typedef typename value_traits::node_traits node_traits;
typedef typename node_traits::node_ptr node_ptr;
typedef typename get_slist_impl
< typename reduced_slist_node_traits
<node_traits>::type >::type slist_impl;
typedef typename slist_impl::iterator siterator;
typedef typename slist_impl::const_iterator const_siterator;
typedef bucket_impl<slist_impl> bucket_type;
typedef typename BucketValueTraits::bucket_type bucket_type;
typedef typename bucket_type::node_traits slist_node_traits;
typedef typename slist_node_traits::node_ptr slist_node_ptr;
typedef trivial_value_traits
<slist_node_traits, normal_link> slist_value_traits;
typedef slist_iterator<slist_value_traits, false> siterator;
typedef slist_iterator<slist_value_traits, true> const_siterator;
typedef circular_slist_algorithms<slist_node_traits> slist_node_algorithms;
typedef typename pointer_traits
<pointer>::template rebind_pointer
< const BucketValueTraits >::type const_bucketvaltraits_ptr;
typedef typename slist_impl::size_type size_type;
class nat;
typedef typename
detail::if_c< IsConst
, hashtable_iterator<BucketValueTraits, false>
, hashtable_iterator<BucketValueTraits, LinearBuckets, false>
, nat>::type nonconst_iterator;
BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::node_ptr p)
BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::node_traits::node_ptr p)
{
return pointer_traits<node_ptr>::
pointer_to(static_cast<typename node_traits::node&>(*p));
@@ -211,8 +164,8 @@ class hashtable_iterator
BOOST_INTRUSIVE_FORCEINLINE const siterator &slist_it() const
{ return slist_it_; }
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, false> unconst() const
{ return hashtable_iterator<BucketValueTraits, false>(this->slist_it(), this->get_bucket_value_traits()); }
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, LinearBuckets, false> unconst() const
{ return hashtable_iterator<BucketValueTraits, LinearBuckets, false>(this->slist_it(), this->get_bucket_value_traits()); }
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator& operator++()
{ this->increment(); return *this; }
@@ -252,33 +205,36 @@ class hashtable_iterator
{ return traitsptr_->priv_bucket_traits(); }
private:
void increment()
{
const bucket_traits &rbuck_traits = this->priv_bucket_traits();
bucket_type* const buckets = boost::movelib::to_raw_pointer(rbuck_traits.bucket_begin());
const size_type buckets_len = rbuck_traits.bucket_count();
const std::size_t buckets_len = rbuck_traits.bucket_count();
++slist_it_;
const typename slist_impl::node_ptr n = slist_it_.pointed_node();
const siterator first_bucket_bbegin = buckets->end();
if(first_bucket_bbegin.pointed_node() <= n && n <= buckets[buckets_len-1].cend().pointed_node()){
const slist_node_ptr n = slist_it_.pointed_node();
const siterator first_bucket_bbegin(buckets->get_node_ptr());
if(first_bucket_bbegin.pointed_node() <= n && n <= buckets[buckets_len-1].get_node_ptr()){
//If one-past the node is inside the bucket then look for the next non-empty bucket
//1. get the bucket_impl from the iterator
const bucket_type &b = static_cast<const bucket_type&>
(bucket_type::slist_type::container_from_end_iterator(slist_it_));
const bucket_type &b = static_cast<const bucket_type&>(*n);
//2. Now just calculate the index b has in the bucket array
size_type n_bucket = static_cast<size_type>(&b - buckets);
std::size_t n_bucket = static_cast<std::size_t>(&b - buckets);
//3. Iterate until a non-empty bucket is found
slist_node_ptr bucket_nodeptr = buckets->get_node_ptr();
do{
if (++n_bucket >= buckets_len){ //bucket overflow, return end() iterator
slist_it_ = buckets->before_begin();
slist_it_ = first_bucket_bbegin;
return;
}
bucket_nodeptr = buckets[n_bucket].get_node_ptr();
}
while (buckets[n_bucket].empty());
slist_it_ = buckets[n_bucket].begin();
while (slist_node_algorithms::is_empty(bucket_nodeptr));
slist_it_ = siterator(bucket_nodeptr);
++slist_it_;
}
else{
//++slist_it_ yield to a valid object
@@ -289,6 +245,134 @@ class hashtable_iterator
const_bucketvaltraits_ptr traitsptr_;
};
template<class BucketValueTraits, bool IsConst>
class hashtable_iterator<BucketValueTraits, true, IsConst>
{
typedef typename BucketValueTraits::value_traits value_traits;
typedef typename BucketValueTraits::bucket_traits bucket_traits;
typedef iiterator< value_traits, IsConst
, std::forward_iterator_tag> types_t;
public:
typedef typename types_t::iterator_type::difference_type difference_type;
typedef typename types_t::iterator_type::value_type value_type;
typedef typename types_t::iterator_type::pointer pointer;
typedef typename types_t::iterator_type::reference reference;
typedef typename types_t::iterator_type::iterator_category iterator_category;
private:
typedef typename value_traits::node_traits node_traits;
typedef typename node_traits::node_ptr node_ptr;
typedef typename BucketValueTraits::bucket_type bucket_type;
typedef typename BucketValueTraits::bucket_ptr bucket_ptr;
typedef typename bucket_type::node_traits slist_node_traits;
typedef linear_slist_algorithms<slist_node_traits> slist_node_algorithms;
typedef typename slist_node_traits::node_ptr slist_node_ptr;
typedef trivial_value_traits
<slist_node_traits, normal_link> slist_value_traits;
typedef slist_iterator<slist_value_traits, false> siterator;
typedef slist_iterator<slist_value_traits, true> const_siterator;
static const bool stateful_value_traits =
detail::is_stateful_value_traits<value_traits>::value;
typedef typename pointer_traits
<pointer>::template rebind_pointer
< const value_traits >::type const_value_traits_ptr;
class nat;
typedef typename
detail::if_c< IsConst
, hashtable_iterator<BucketValueTraits, true, false>
, nat>::type nonconst_iterator;
BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(slist_node_ptr p)
{
return pointer_traits<node_ptr>::
pointer_to(static_cast<typename node_traits::node&>(*p));
}
public:
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator ()
: slist_it_() //Value initialization to achieve "null iterators" (N3644)
, members_()
{}
BOOST_INTRUSIVE_FORCEINLINE explicit hashtable_iterator(siterator ptr, bucket_ptr bp, const_value_traits_ptr traits_ptr)
: slist_it_ (ptr)
, members_ (bp, traits_ptr)
{}
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const hashtable_iterator &other)
: slist_it_(other.slist_it()), members_(other.get_bucket_ptr(), other.get_value_traits())
{}
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const nonconst_iterator &other)
: slist_it_(other.slist_it()), members_(other.get_bucket_ptr(), other.get_value_traits())
{}
BOOST_INTRUSIVE_FORCEINLINE const siterator &slist_it() const
{ return slist_it_; }
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator<BucketValueTraits, true, false> unconst() const
{ return hashtable_iterator<BucketValueTraits, true, false>(this->slist_it(), members_.nodeptr_, members_.get_ptr()); }
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator& operator++()
{ this->increment(); return *this; }
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator &operator=(const hashtable_iterator &other)
{ slist_it_ = other.slist_it(); members_ = other.members_; return *this; }
BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator operator++(int)
{
hashtable_iterator result (*this);
this->increment();
return result;
}
BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const hashtable_iterator& i, const hashtable_iterator& i2)
{ return i.slist_it_ == i2.slist_it_; }
BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const hashtable_iterator& i, const hashtable_iterator& i2)
{ return !(i == i2); }
BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
{ return *this->operator ->(); }
BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
{ return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
{ return members_.get_ptr(); }
BOOST_INTRUSIVE_FORCEINLINE bucket_ptr get_bucket_ptr() const
{ return members_.nodeptr_; }
private:
BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
{ return value_traits::to_value_ptr(downcast_bucket(slist_it_.pointed_node())); }
BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
{ return this->get_value_traits()->to_value_ptr(downcast_bucket(slist_it_.pointed_node())); }
void increment()
{
++slist_it_;
if (slist_it_ == siterator()){
slist_node_ptr bucket_nodeptr;
do {
++members_.nodeptr_;
bucket_nodeptr = members_.nodeptr_->get_node_ptr();
}while(slist_node_algorithms::is_empty(bucket_nodeptr));
slist_it_ = siterator(slist_node_traits::get_next(bucket_nodeptr));
}
}
siterator slist_it_;
iiterator_members<bucket_ptr, const_value_traits_ptr, stateful_value_traits> members_;
};
} //namespace intrusive {
} //namespace boost {
File diff suppressed because it is too large. Load diff
@@ -570,6 +570,7 @@ template
, class O8 = void
, class O9 = void
, class O10 = void
, class O11 = void
>
#else
template<class T, class ...Options>
@@ -589,6 +590,7 @@ template
, class O8 = void
, class O9 = void
, class O10 = void
, class O11 = void
>
#else
template<class T, class ...Options>
+5
View File
@@ -241,6 +241,11 @@ BOOST_INTRUSIVE_OPTION_CONSTANT(compare_hash, bool, Enabled, compare_hash)
//!(rehashing the whole bucket array) is not admisible.
BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, incremental)
//!This option setter specifies if the buckets (which form a singly linked lists of nodes)
//!are linear (true) or circular (false, default value). Linear buckets can improve performance
//!in some cases, but the container loses some features like obtaining an iterator from a value.
BOOST_INTRUSIVE_OPTION_CONSTANT(linear_buckets, bool, Enabled, linear_buckets)
/// @cond
struct hook_defaults
+9 -2
View File
@@ -28,8 +28,13 @@ namespace intrusive {
/// @cond
template<class U>
void priority_order();
namespace adldft {
template<class T, class U>
BOOST_INTRUSIVE_FORCEINLINE bool priority_order(const T &t, const U &u)
{ return t < u; }
} //namespace adldft {
/// @endcond
@@ -43,6 +48,7 @@ struct priority_compare
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &val, const T &val2) const
{
using adldft::priority_order;
return priority_order(val, val2);
}
};
@@ -53,6 +59,7 @@ struct priority_compare<void>
template<class T, class U>
BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &t, const U &u) const
{
using adldft::priority_order;
return priority_order(t, u);
}
};
+23 -18
View File
@@ -67,7 +67,9 @@ template<class T, class ...Options>
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
#endif
class unordered_set_impl
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
: public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos>
#endif
{
/// @cond
private:
@@ -115,7 +117,6 @@ class unordered_set_impl
typedef typename implementation_defined::node node;
typedef typename implementation_defined::node_ptr node_ptr;
typedef typename implementation_defined::const_node_ptr const_node_ptr;
typedef typename implementation_defined::node_algorithms node_algorithms;
public:
@@ -420,6 +421,7 @@ template<class T, class O1 = void, class O2 = void
, class O5 = void, class O6 = void
, class O7 = void, class O8 = void
, class O9 = void, class O10= void
, class O11 = void
>
#endif
struct make_unordered_set
@@ -428,7 +430,7 @@ struct make_unordered_set
typedef typename pack_options
< hashtable_defaults,
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
#else
Options...
#endif
@@ -438,7 +440,7 @@ struct make_unordered_set
<T, typename packed_options::proto_value_traits>::type value_traits;
typedef typename make_bucket_traits
<T, true, packed_options>::type bucket_traits;
<T, packed_options>::type bucket_traits;
typedef unordered_set_impl
< value_traits
@@ -453,6 +455,7 @@ struct make_unordered_set
| (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
| (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
| (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
| (std::size_t(packed_options::linear_buckets)*hash_bool_flags::linear_buckets_pos)
> implementation_defined;
/// @endcond
@@ -462,27 +465,26 @@ struct make_unordered_set
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10, class O11>
#else
template<class T, class ...Options>
#endif
class unordered_set
: public make_unordered_set<T,
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
#else
Options...
#endif
>::type
{
typedef typename make_unordered_set
<T,
typedef typename make_unordered_set<T,
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
#else
Options...
#endif
>::type Base;
>::type Base;
//Assert if passed value traits are compatible with the type
BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
@@ -526,11 +528,11 @@ class unordered_set
template <class Cloner, class Disposer>
BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_set &src, Cloner cloner, Disposer disposer)
{ Base::clone_from(src, cloner, disposer); }
{ this->Base::clone_from(src, cloner, disposer); }
template <class Cloner, class Disposer>
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_set) src, Cloner cloner, Disposer disposer)
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
{ this->Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
};
#endif
@@ -577,7 +579,9 @@ template<class T, class ...Options>
template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
#endif
class unordered_multiset_impl
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
: public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags>
#endif
{
/// @cond
private:
@@ -613,7 +617,6 @@ class unordered_multiset_impl
typedef typename implementation_defined::node node;
typedef typename implementation_defined::node_ptr node_ptr;
typedef typename implementation_defined::const_node_ptr const_node_ptr;
typedef typename implementation_defined::node_algorithms node_algorithms;
public:
@@ -872,6 +875,7 @@ template<class T, class O1 = void, class O2 = void
, class O5 = void, class O6 = void
, class O7 = void, class O8 = void
, class O9 = void, class O10= void
, class O11 = void
>
#endif
struct make_unordered_multiset
@@ -880,7 +884,7 @@ struct make_unordered_multiset
typedef typename pack_options
< hashtable_defaults,
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
#else
Options...
#endif
@@ -890,7 +894,7 @@ struct make_unordered_multiset
<T, typename packed_options::proto_value_traits>::type value_traits;
typedef typename make_bucket_traits
<T, true, packed_options>::type bucket_traits;
<T, packed_options>::type bucket_traits;
typedef unordered_multiset_impl
< value_traits
@@ -905,6 +909,7 @@ struct make_unordered_multiset
| (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
| (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
| (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
| (std::size_t(packed_options::linear_buckets)*hash_bool_flags::linear_buckets_pos)
> implementation_defined;
/// @endcond
@@ -914,14 +919,14 @@ struct make_unordered_multiset
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10, class O11>
#else
template<class T, class ...Options>
#endif
class unordered_multiset
: public make_unordered_multiset<T,
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
O1, O2, O3, O4, O5, O6, O7, O8, O9, O10, O11
#else
Options...
#endif
@@ -977,11 +982,11 @@ class unordered_multiset
template <class Cloner, class Disposer>
BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_multiset &src, Cloner cloner, Disposer disposer)
{ Base::clone_from(src, cloner, disposer); }
{ this->Base::clone_from(src, cloner, disposer); }
template <class Cloner, class Disposer>
BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_multiset) src, Cloner cloner, Disposer disposer)
{ Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
{ this->Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
};
#endif
@@ -108,10 +108,10 @@ struct unordered_group_adapter
typedef typename NodeTraits::node_ptr node_ptr;
typedef typename NodeTraits::const_node_ptr const_node_ptr;
static node_ptr get_next(const_node_ptr n)
BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const_node_ptr n)
{ return NodeTraits::get_prev_in_group(n); }
static void set_next(node_ptr n, node_ptr next)
BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
{ NodeTraits::set_prev_in_group(n, next); }
};