mirror of
https://github.com/boostorg/intrusive.git
synced 2025-05-09 23:03:56 +00:00
Changes for 1.56 made during Git transition:
* Improved Doxygen generated reference and updated and fixed forward-declaration header. * Source breaking: Removed previously deprecated `xxx_dont_splay` functions from splay containers and removed `splay_set_base_hook` and `splay_set_member_hook`from splay containers.
This commit is contained in:
parent
edec698381
commit
ea126390a7
@ -33,10 +33,12 @@ doxygen autodoc
|
||||
\"BOOST_RV_REF_END=&&\" \\
|
||||
\"list_impl=list\" \\
|
||||
\"slist_impl=slist\" \\
|
||||
\"bstree_impl=bstree\" \\
|
||||
\"bs_set_impl=bs_set\" \\
|
||||
\"bs_multiset_impl=bs_multiset\" \\
|
||||
\"rbtree_impl=rbtree\" \\
|
||||
\"set_impl=set\" \\
|
||||
\"multiset_impl=multiset\" \\
|
||||
\"bstree_impl=bstree\" \\
|
||||
\"rbtree_impl=rbtree\" \\
|
||||
\"unordered_set_impl=unordered_set\" \\
|
||||
\"unordered_multiset_impl=unordered_multiset\" \\
|
||||
\"hashtable_impl=hashtable\" \\
|
||||
|
@ -3886,6 +3886,11 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
||||
|
||||
[section:release_notes_boost_1_56_00 Boost 1.56 Release]
|
||||
|
||||
* Improved Doxygen generated reference and updated and fixed forward-declaration header.
|
||||
|
||||
* [*Source breaking]: Removed previously deprecated `xxx_dont_splay` functions from splay containers and
|
||||
removed `splay_set_base_hook` and `splay_set_member_hook`from splay containers.
|
||||
|
||||
* Fixed bugs:
|
||||
* [@https://svn.boost.org/trac/boost/ticket/9332 #9332: ['"has_member_function_callable_with.hpp compile error on msvc-12.0"]].
|
||||
|
||||
@ -3894,7 +3899,8 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
|
||||
[section:release_notes_boost_1_55_00 Boost 1.55 Release]
|
||||
|
||||
* [*Source breaking]: Deprecated `xxx_dont_splay` functions from splay containers.
|
||||
Deprecated `splay_set_hook` from splay containers, use `bs_set_hook` instead.
|
||||
Deprecated `splay_set_base_hook` and `splay_set_member_hook`from splay containers, use
|
||||
`bs_set_base_hook` or `bs_set_member_hook` instead.
|
||||
Both will be removed in Boost 1.56.
|
||||
|
||||
* [*ABI breaking]: Hash containers' end iterator was implemented pointing to one-past the end of the bucket array
|
||||
|
@ -11,7 +11,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//[doc_splay_set_code
|
||||
#include <boost/intrusive/splay_set.hpp>
|
||||
#include <boost/intrusive/bs_set_hook.hpp>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
@ -20,14 +19,13 @@ using namespace boost::intrusive;
|
||||
class mytag;
|
||||
|
||||
class MyClass
|
||||
: public splay_set_base_hook<> //This is an splay tree base hook
|
||||
, public bs_set_base_hook< tag<mytag> > //This is a binary search tree base hook
|
||||
: public bs_set_base_hook<>
|
||||
{
|
||||
int int_;
|
||||
|
||||
public:
|
||||
//This is a member hook
|
||||
splay_set_member_hook<> member_hook_;
|
||||
bs_set_member_hook<> member_hook_;
|
||||
|
||||
MyClass(int i)
|
||||
: int_(i)
|
||||
@ -43,11 +41,8 @@ class MyClass
|
||||
//Define a set using the base hook that will store values in reverse order
|
||||
typedef splay_set< MyClass, compare<std::greater<MyClass> > > BaseSplaySet;
|
||||
|
||||
//Define a set using the binary search tree hook
|
||||
typedef splay_set< MyClass, base_hook<bs_set_base_hook< tag<mytag> > > > BaseBsSplaySet;
|
||||
|
||||
//Define an multiset using the member hook
|
||||
typedef member_hook<MyClass, splay_set_member_hook<>, &MyClass::member_hook_> MemberOption;
|
||||
typedef member_hook<MyClass, bs_set_member_hook<>, &MyClass::member_hook_> MemberOption;
|
||||
typedef splay_multiset< MyClass, MemberOption> MemberSplayMultiset;
|
||||
|
||||
int main()
|
||||
@ -59,21 +54,18 @@ int main()
|
||||
for(int i = 0; i < 100; ++i) values.push_back(MyClass(i));
|
||||
|
||||
BaseSplaySet baseset;
|
||||
BaseBsSplaySet bsbaseset;
|
||||
MemberSplayMultiset membermultiset;
|
||||
|
||||
|
||||
//Insert values in the container
|
||||
for(VectIt it(values.begin()), itend(values.end()); it != itend; ++it){
|
||||
baseset.insert(*it);
|
||||
bsbaseset.insert(*it);
|
||||
membermultiset.insert(*it);
|
||||
}
|
||||
|
||||
//Now test sets
|
||||
{
|
||||
BaseSplaySet::reverse_iterator rbit(baseset.rbegin());
|
||||
BaseBsSplaySet::iterator bsit(bsbaseset.begin());
|
||||
MemberSplayMultiset::iterator mit(membermultiset.begin());
|
||||
VectIt it(values.begin()), itend(values.end());
|
||||
|
||||
@ -83,8 +75,7 @@ int main()
|
||||
}
|
||||
|
||||
//Test the objects inserted in member and binary search hook sets
|
||||
for(it = values.begin(); it != itend; ++it, ++bsit, ++mit){
|
||||
if(&*bsit != &*it) return 1;
|
||||
for(it = values.begin(); it != itend; ++it, ++mit){
|
||||
if(&*mit != &*it) return 1;
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,7 @@
|
||||
#define BOOST_INTRUSIVE_AVLTREE_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
@ -21,7 +22,6 @@
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/avl_set_hook.hpp>
|
||||
#include <boost/intrusive/detail/avltree_node.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
|
@ -15,9 +15,9 @@
|
||||
#define BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/detail/utilities.hpp>
|
||||
|
@ -13,6 +13,7 @@
|
||||
#define BOOST_INTRUSIVE_BSTREE_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
@ -22,7 +23,7 @@
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/set_hook.hpp>
|
||||
#include <boost/intrusive/bs_set_hook.hpp>
|
||||
#include <boost/intrusive/detail/tree_node.hpp>
|
||||
#include <boost/intrusive/detail/ebo_functor_holder.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
|
@ -14,8 +14,8 @@
|
||||
#define BOOST_INTRUSIVE_BSTREE_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/detail/utilities.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
|
@ -13,6 +13,9 @@
|
||||
#ifndef BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
|
||||
#define BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
#include <boost/pointer_cast.hpp>
|
||||
#include <boost/pointer_to_other.hpp>
|
||||
@ -24,7 +27,12 @@ namespace intrusive {
|
||||
//!This value traits template is used to create value traits
|
||||
//!from user defined node traits where value_traits::value_type will
|
||||
//!derive from node_traits::node
|
||||
template<class T, class NodeTraits, link_mode_type LinkMode = safe_link>
|
||||
|
||||
template<class T, class NodeTraits, link_mode_type LinkMode
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
= safe_link
|
||||
#endif
|
||||
>
|
||||
struct derivation_value_traits
|
||||
{
|
||||
public:
|
||||
@ -67,4 +75,6 @@ struct derivation_value_traits
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
|
||||
|
@ -33,9 +33,9 @@ enum base_hook_type
|
||||
, SlistBaseHookId
|
||||
, RbTreeBaseHookId
|
||||
, HashBaseHookId
|
||||
, SplayTreeBaseHookId
|
||||
, AvlTreeBaseHookId
|
||||
, BsTreeBaseHookId
|
||||
, TreapTreeBaseHookId
|
||||
, AnyBaseHookId
|
||||
};
|
||||
|
||||
@ -59,10 +59,6 @@ template <class HookTags>
|
||||
struct hook_tags_definer<HookTags, HashBaseHookId>
|
||||
{ typedef HookTags default_hashtable_hook; };
|
||||
|
||||
template <class HookTags>
|
||||
struct hook_tags_definer<HookTags, SplayTreeBaseHookId>
|
||||
{ typedef HookTags default_splaytree_hook; };
|
||||
|
||||
template <class HookTags>
|
||||
struct hook_tags_definer<HookTags, AvlTreeBaseHookId>
|
||||
{ typedef HookTags default_avltree_hook; };
|
||||
|
@ -13,6 +13,7 @@
|
||||
#define BOOST_INTRUSIVE_HASHTABLE_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
//std C++
|
||||
#include <functional> //std::equal_to
|
||||
#include <utility> //std::pair
|
||||
@ -24,7 +25,6 @@
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/pointer_cast.hpp>
|
||||
//General intrusive utilities
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/hashtable_node.hpp>
|
||||
#include <boost/intrusive/detail/transform_iterator.hpp>
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
|
@ -13,12 +13,47 @@
|
||||
#ifndef BOOST_INTRUSIVE_FWD_HPP
|
||||
#define BOOST_INTRUSIVE_FWD_HPP
|
||||
|
||||
//! \file
|
||||
//! This header file forward declares most Intrusive classes.
|
||||
//!
|
||||
//! It forward declares the following containers and hooks:
|
||||
//! - boost::intrusive::slist / boost::intrusive::slist_base_hook / boost::intrusive::slist_member_hook
|
||||
//! - boost::intrusive::list / boost::intrusive::list_base_hook / boost::intrusive::list_member_hook
|
||||
//! - boost::intrusive::bstree / boost::intrusive::bs_set / boost::intrusive::bs_multiset /
|
||||
//! boost::intrusive::bs_set_base_hook / boost::intrusive::bs_set_member_hook
|
||||
//! - boost::intrusive::rbtree / boost::intrusive::set / boost::intrusive::multiset /
|
||||
//! boost::intrusive::set_base_hook / boost::intrusive::set_member_hook
|
||||
//! - boost::intrusive::avltree / boost::intrusive::avl_set / boost::intrusive::avl_multiset /
|
||||
//! boost::intrusive::avl_set_base_hook / boost::intrusive::avl_set_member_hook
|
||||
//! - boost::intrusive::splaytree / boost::intrusive::splay_set / boost::intrusive::splay_multiset
|
||||
//! - boost::intrusive::sgtree / boost::intrusive::sg_set / boost::intrusive::sg_multiset
|
||||
//! - boost::intrusive::treap / boost::intrusive::treap_set / boost::intrusive::treap_multiset
|
||||
//! - boost::intrusive::hashtable / boost::intrusive::unordered_set / boost::intrusive::unordered_multiset /
|
||||
//! boost::intrusive::unordered_set_base_hook / boost::intrusive::unordered_set_member_hook /
|
||||
//! - boost::intrusive::any_base_hook / boost::intrusive::any_member_hook
|
||||
//!
|
||||
//! It forward declares the following container or hook options:
|
||||
//! - boost::intrusive::constant_time_size / boost::intrusive::size_type / boost::intrusive::compare / boost::intrusive::equal
|
||||
//! - boost::intrusive::floating_point / boost::intrusive::priority / boost::intrusive::hash
|
||||
//! - boost::intrusive::value_traits / boost::intrusive::member_hook / boost::intrusive::function_hook / boost::intrusive::base_hook
|
||||
//! - boost::intrusive::void_pointer / boost::intrusive::tag / boost::intrusive::link_mode
|
||||
//! - boost::intrusive::optimize_size / boost::intrusive::linear / boost::intrusive::cache_last
|
||||
//! - boost::intrusive::bucket_traits / boost::intrusive::store_hash / boost::intrusive::optimize_multikey
|
||||
//! - boost::intrusive::power_2_buckets / boost::intrusive::cache_begin / boost::intrusive::compare_hash / boost::intrusive::incremental
|
||||
//!
|
||||
//! It forward declares the following value traits utilities:
|
||||
//! - boost::intrusive::value_traits / boost::intrusive::derivation_value_traits /
|
||||
//! boost::intrusive::trivial_value_traits
|
||||
//!
|
||||
//! Finally it forward declares the following general purpose utilities:
|
||||
//! - boost::intrusive::pointer_plus_bits / boost::intrusive::priority_compare.
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
|
||||
/// @cond
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
@ -33,15 +68,33 @@ class circular_list_algorithms;
|
||||
template<class NodeTraits>
|
||||
class circular_slist_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class linear_slist_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class bstree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class rbtree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class avltree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class sgtree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class splaytree_algorithms;
|
||||
|
||||
template<class NodeTraits>
|
||||
class treap_algorithms;
|
||||
|
||||
////////////////////////////
|
||||
// Containers
|
||||
////////////////////////////
|
||||
|
||||
//slist
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -55,7 +108,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class slist;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -66,7 +119,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class slist_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -78,7 +131,7 @@ template<class ...Options>
|
||||
class slist_member_hook;
|
||||
|
||||
//list
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -90,7 +143,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class list;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -101,7 +154,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class list_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -112,19 +165,8 @@ template<class ...Options>
|
||||
#endif
|
||||
class list_member_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class list_hook;
|
||||
|
||||
//rbtree/set/multiset
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -137,7 +179,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class rbtree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -150,7 +192,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -163,7 +205,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -175,7 +217,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -188,7 +230,7 @@ template<class ...Options>
|
||||
class set_member_hook;
|
||||
|
||||
//splaytree/splay_set/splay_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -201,7 +243,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class splaytree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -214,7 +256,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class splay_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -227,30 +269,8 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class splay_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class splay_set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
, class O3 = void
|
||||
>
|
||||
#else
|
||||
template<class ...Options>
|
||||
#endif
|
||||
class splay_set_member_hook;
|
||||
|
||||
//avltree/avl_set/avl_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -263,7 +283,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class avltree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -276,7 +296,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class avl_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -289,7 +309,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class avl_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -301,7 +321,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class avl_set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -315,7 +335,7 @@ class avl_set_member_hook;
|
||||
|
||||
|
||||
//treap/treap_set/treap_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -328,7 +348,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class treap;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -341,7 +361,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class treap_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -354,12 +374,8 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class treap_multiset;
|
||||
|
||||
//Default priority comparison functor
|
||||
template <class T>
|
||||
struct priority_compare;
|
||||
|
||||
//sgtree/sg_set/sg_multiset
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -372,7 +388,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class sgtree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -385,7 +401,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class sg_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -398,7 +414,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class sg_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -411,7 +427,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class bstree;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -424,7 +440,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class bs_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -437,7 +453,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class bs_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -448,7 +464,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class bs_set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -461,7 +477,7 @@ class bs_set_member_hook;
|
||||
|
||||
//hashtable/unordered_set/unordered_multiset
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -480,7 +496,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class hashtable;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -499,7 +515,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class unordered_set;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class T
|
||||
, class O1 = void
|
||||
@ -518,7 +534,7 @@ template<class T, class ...Options>
|
||||
#endif
|
||||
class unordered_multiset;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -530,7 +546,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class unordered_set_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -542,7 +558,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class unordered_set_member_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -553,7 +569,7 @@ template<class ...Options>
|
||||
#endif
|
||||
class any_base_hook;
|
||||
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) && !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template
|
||||
< class O1 = void
|
||||
, class O2 = void
|
||||
@ -564,9 +580,126 @@ template<class ...Options>
|
||||
#endif
|
||||
class any_member_hook;
|
||||
|
||||
//Options
|
||||
|
||||
template<bool Enabled>
|
||||
struct constant_time_size;
|
||||
|
||||
template<typename SizeType>
|
||||
struct size_type;
|
||||
|
||||
template<typename Compare>
|
||||
struct compare;
|
||||
|
||||
template<bool Enabled>
|
||||
struct floating_point;
|
||||
|
||||
template<typename Equal>
|
||||
struct equal;
|
||||
|
||||
template<typename Priority>
|
||||
struct priority;
|
||||
|
||||
template<typename Hash>
|
||||
struct hash;
|
||||
|
||||
template<typename ValueTraits> struct value_traits;
|
||||
|
||||
template< typename Parent
|
||||
, typename MemberHook
|
||||
, MemberHook Parent::* PtrToMember>
|
||||
struct member_hook;
|
||||
|
||||
template<typename Functor>
|
||||
struct function_hook;
|
||||
|
||||
template<typename BaseHook>
|
||||
struct base_hook;
|
||||
|
||||
template<typename VoidPointer>
|
||||
struct void_pointer;
|
||||
|
||||
template<typename Tag>
|
||||
struct tag;
|
||||
|
||||
template<link_mode_type LinkType>
|
||||
struct link_mode;
|
||||
|
||||
template<bool Enabled> struct
|
||||
optimize_size;
|
||||
|
||||
template<bool Enabled>
|
||||
struct linear;
|
||||
|
||||
template<bool Enabled>
|
||||
struct cache_last;
|
||||
|
||||
template<typename BucketTraits>
|
||||
struct bucket_traits;
|
||||
|
||||
template<bool Enabled>
|
||||
struct store_hash;
|
||||
|
||||
template<bool Enabled>
|
||||
struct optimize_multikey;
|
||||
|
||||
template<bool Enabled>
|
||||
struct power_2_buckets;
|
||||
|
||||
template<bool Enabled>
|
||||
struct cache_begin;
|
||||
|
||||
template<bool Enabled>
|
||||
struct compare_hash;
|
||||
|
||||
template<bool Enabled>
|
||||
struct incremental;
|
||||
|
||||
//Value traits
|
||||
|
||||
template<typename ValueTraits>
|
||||
struct value_traits;
|
||||
|
||||
template< typename Parent
|
||||
, typename MemberHook
|
||||
, MemberHook Parent::* PtrToMember>
|
||||
struct member_hook;
|
||||
|
||||
template< typename Functor>
|
||||
struct function_hook;
|
||||
|
||||
template<typename BaseHook>
|
||||
struct base_hook;
|
||||
|
||||
template<class T, class NodeTraits, link_mode_type LinkMode = safe_link>
|
||||
struct derivation_value_traits;
|
||||
|
||||
template<class NodeTraits, link_mode_type LinkMode = normal_link>
|
||||
struct trivial_value_traits;
|
||||
|
||||
//Additional utilities
|
||||
|
||||
template<typename VoidPointer, std::size_t Alignment>
|
||||
struct max_pointer_plus_bits;
|
||||
|
||||
template<std::size_t Alignment>
|
||||
struct max_pointer_plus_bits<void *, Alignment>;
|
||||
|
||||
template<typename Pointer, std::size_t NumBits>
|
||||
struct pointer_plus_bits;
|
||||
|
||||
template<typename T, std::size_t NumBits>
|
||||
struct pointer_plus_bits<T *, NumBits>;
|
||||
|
||||
template<typename Ptr>
|
||||
struct pointer_traits;
|
||||
|
||||
template<typename T>
|
||||
struct pointer_traits<T *>;
|
||||
|
||||
} //namespace intrusive {
|
||||
} //namespace boost {
|
||||
|
||||
/// @endcond
|
||||
#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
|
||||
#endif //#ifndef BOOST_INTRUSIVE_FWD_HPP
|
||||
|
@ -15,8 +15,8 @@
|
||||
#define BOOST_INTRUSIVE_LIST_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/list_hook.hpp>
|
||||
#include <boost/intrusive/circular_list_algorithms.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
|
@ -13,6 +13,9 @@
|
||||
#ifndef BOOST_INTRUSIVE_MEMBER_VALUE_TRAITS_HPP
|
||||
#define BOOST_INTRUSIVE_MEMBER_VALUE_TRAITS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
#include <iterator>
|
||||
#include <boost/intrusive/detail/parent_from_member.hpp>
|
||||
@ -26,7 +29,11 @@ namespace intrusive {
|
||||
//!store a node_traits::node
|
||||
template< class T, class NodeTraits
|
||||
, typename NodeTraits::node T::* PtrToMember
|
||||
, link_mode_type LinkMode = safe_link>
|
||||
, link_mode_type LinkMode
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
= safe_link
|
||||
#endif
|
||||
>
|
||||
struct member_value_traits
|
||||
{
|
||||
public:
|
||||
@ -67,4 +74,6 @@ struct member_value_traits
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_MEMBER_VALUE_TRAITS_HPP
|
||||
|
@ -13,6 +13,8 @@
|
||||
#define BOOST_INTRUSIVE_GET_PARENT_FROM_MEMBER_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/parent_from_member.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
@ -13,6 +13,8 @@
|
||||
#ifndef BOOST_INTRUSIVE_POINTER_PLUS_BITS_HPP
|
||||
#define BOOST_INTRUSIVE_POINTER_PLUS_BITS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/mpl.hpp> //ls_zeros
|
||||
#include <boost/intrusive/detail/assert.hpp> //BOOST_INTRUSIVE_INVARIANT_ASSERT
|
||||
|
||||
@ -83,4 +85,6 @@ struct pointer_plus_bits<T*, NumBits>
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_POINTER_PLUS_BITS_HPP
|
||||
|
@ -22,6 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
#include <boost/intrusive/detail/memory_util.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
|
@ -13,13 +13,13 @@
|
||||
#define BOOST_INTRUSIVE_RBTREE_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <utility>
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/set_hook.hpp>
|
||||
#include <boost/intrusive/detail/rbtree_node.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
|
@ -49,9 +49,9 @@
|
||||
#define BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/detail/utilities.hpp>
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/mpl.hpp>
|
||||
#include <boost/intrusive/rbtree.hpp>
|
||||
#include <iterator>
|
||||
|
@ -16,6 +16,7 @@
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/utilities.hpp>
|
||||
#include <boost/intrusive/detail/rbtree_node.hpp>
|
||||
#include <boost/intrusive/rbtree_algorithms.hpp>
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define BOOST_INTRUSIVE_SGTREE_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
@ -28,7 +29,6 @@
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/bs_set_hook.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
#include <boost/intrusive/detail/tree_node.hpp>
|
||||
|
@ -18,9 +18,9 @@
|
||||
#define BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/detail/utilities.hpp>
|
||||
#include <boost/intrusive/bstree_algorithms.hpp>
|
||||
|
@ -15,9 +15,9 @@
|
||||
#define BOOST_INTRUSIVE_SLIST_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/slist_hook.hpp>
|
||||
#include <boost/intrusive/circular_slist_algorithms.hpp>
|
||||
#include <boost/intrusive/linear_slist_algorithms.hpp>
|
||||
|
@ -1,286 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Olaf Krzikalla 2004-2006.
|
||||
// (C) Copyright Ion Gaztanaga 2006-2013
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_INTRUSIVE_SPLAY_SET_HOOK_HPP
|
||||
#define BOOST_INTRUSIVE_SPLAY_SET_HOOK_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/bs_set_hook.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
|
||||
//! Helper metafunction to define a \c splay_set_base_hook that yields to the same
|
||||
//! type when the same options (either explicitly or implicitly) are used.
|
||||
//! <b>WARNING: </b> Deprecated class, use `make_bs_set_base_hook` instead.
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template<class ...Options>
|
||||
#else
|
||||
template<class O1 = void, class O2 = void, class O3 = void>
|
||||
#endif
|
||||
struct make_splay_set_base_hook
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
: public make_bs_set_base_hook<Options...>
|
||||
#else
|
||||
: public make_bs_set_base_hook<O1, O2, O3>
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
/// @cond
|
||||
typedef typename make_bs_set_base_hook
|
||||
<
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type implementation_defined;
|
||||
/// @endcond
|
||||
typedef implementation_defined type;
|
||||
};
|
||||
|
||||
//! Derive a class from splay_set_base_hook in order to store objects in
|
||||
//! in a splay_set/splay_multiset. splay_set_base_hook holds the data necessary to maintain
|
||||
//! the splay_set/splay_multiset and provides an appropriate value_traits class for splay_set/splay_multiset.
|
||||
//!
|
||||
//! The hook admits the following options: \c tag<>, \c void_pointer<>,
|
||||
//! \c link_mode<> and \c optimize_size<>.
|
||||
//!
|
||||
//! \c tag<> defines a tag to identify the node.
|
||||
//! The same tag value can be used in different classes, but if a class is
|
||||
//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its
|
||||
//! unique tag.
|
||||
//!
|
||||
//! \c void_pointer<> is the pointer type that will be used internally in the hook
|
||||
//! and the the container configured to use this hook.
|
||||
//!
|
||||
//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
|
||||
//! \c auto_unlink or \c safe_link).
|
||||
//!
|
||||
//! <b>WARNING: </b> Deprecated class, use `bs_set_base_hook` instead.
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template<class ...Options>
|
||||
#else
|
||||
template<class O1, class O2, class O3>
|
||||
#endif
|
||||
class splay_set_base_hook
|
||||
: public make_splay_set_base_hook<
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type
|
||||
{
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
public:
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
splay_set_base_hook();
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Rationale</b>: Providing a copy-constructor
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
splay_set_base_hook(const splay_set_base_hook& );
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Rationale</b>: Providing an assignment operator
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
splay_set_base_hook& operator=(const splay_set_base_hook& );
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
//! object is stored in a set an assertion is raised. If link_mode is
|
||||
//! \c auto_unlink and \c is_linked() is true, the node is unlinked.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
~splay_set_base_hook();
|
||||
|
||||
//! <b>Effects</b>: Swapping two nodes swaps the position of the elements
|
||||
//! related to those nodes in one or two containers. That is, if the node
|
||||
//! this is part of the element e1, the node x is part of the element e2
|
||||
//! and both elements are included in the containers s1 and s2, then after
|
||||
//! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
|
||||
//! at the position of e1. If one element is not in a container, then
|
||||
//! after the swap-operation the other element is not in a container.
|
||||
//! Iterators to e1 and e2 related to those nodes are invalidated.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(splay_set_base_hook &other);
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
//! <b>Returns</b>: true, if the node belongs to a container, false
|
||||
//! otherwise. This function can be used to test whether \c set::iterator_to
|
||||
//! will return a valid iterator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
bool is_linked() const;
|
||||
|
||||
//! <b>Effects</b>: Removes the node if it's inserted in a container.
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
#endif
|
||||
};
|
||||
|
||||
//! Helper metafunction to define a \c splay_set_member_hook that yields to the same
|
||||
//! type when the same options (either explicitly or implicitly) are used.
|
||||
//!
|
||||
//! <b>WARNING: </b> Deprecated class, use `make_bs_set_member_hook` instead.
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template<class ...Options>
|
||||
#else
|
||||
template<class O1 = void, class O2 = void, class O3 = void>
|
||||
#endif
|
||||
struct make_splay_set_member_hook
|
||||
#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
: public make_bs_set_member_hook<Options...>
|
||||
#else
|
||||
: public make_bs_set_member_hook<O1, O2, O3>
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
/// @cond
|
||||
typedef typename make_bs_set_member_hook
|
||||
<
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type implementation_defined;
|
||||
/// @endcond
|
||||
typedef implementation_defined type;
|
||||
};
|
||||
|
||||
//! Put a public data member splay_set_member_hook in order to store objects of this
|
||||
//! class in a splay_set/splay_multiset. splay_set_member_hook holds the data
|
||||
//! necessary for maintaining the splay_set/splay_multiset and provides an appropriate
|
||||
//! value_traits class for splay_set/splay_multiset.
|
||||
//!
|
||||
//! The hook admits the following options: \c void_pointer<>,
|
||||
//! \c link_mode<> and \c optimize_size<>.
|
||||
//!
|
||||
//! \c void_pointer<> is the pointer type that will be used internally in the hook
|
||||
//! and the the container configured to use this hook.
|
||||
//!
|
||||
//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
|
||||
//! \c auto_unlink or \c safe_link).
|
||||
//!
|
||||
//! <b>WARNING: </b> Deprecated class, use `bs_set_member_hook` instead.
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
template<class ...Options>
|
||||
#else
|
||||
template<class O1, class O2, class O3>
|
||||
#endif
|
||||
class splay_set_member_hook
|
||||
: public make_splay_set_member_hook<
|
||||
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
|
||||
O1, O2, O3
|
||||
#else
|
||||
Options...
|
||||
#endif
|
||||
>::type
|
||||
{
|
||||
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
|
||||
public:
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
splay_set_member_hook();
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
|
||||
//! initializes the node to an unlinked state. The argument is ignored.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Rationale</b>: Providing a copy-constructor
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
splay_set_member_hook(const splay_set_member_hook& );
|
||||
|
||||
//! <b>Effects</b>: Empty function. The argument is ignored.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
//!
|
||||
//! <b>Rationale</b>: Providing an assignment operator
|
||||
//! makes classes using the hook STL-compliant without forcing the
|
||||
//! user to do some additional work. \c swap can be used to emulate
|
||||
//! move-semantics.
|
||||
splay_set_member_hook& operator=(const splay_set_member_hook& );
|
||||
|
||||
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
|
||||
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
|
||||
//! object is stored in a set an assertion is raised. If link_mode is
|
||||
//! \c auto_unlink and \c is_linked() is true, the node is unlinked.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
~splay_set_member_hook();
|
||||
|
||||
//! <b>Effects</b>: Swapping two nodes swaps the position of the elements
|
||||
//! related to those nodes in one or two containers. That is, if the node
|
||||
//! this is part of the element e1, the node x is part of the element e2
|
||||
//! and both elements are included in the containers s1 and s2, then after
|
||||
//! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
|
||||
//! at the position of e1. If one element is not in a container, then
|
||||
//! after the swap-operation the other element is not in a container.
|
||||
//! Iterators to e1 and e2 related to those nodes are invalidated.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void swap_nodes(splay_set_member_hook &other);
|
||||
|
||||
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
|
||||
//!
|
||||
//! <b>Returns</b>: true, if the node belongs to a container, false
|
||||
//! otherwise. This function can be used to test whether \c set::iterator_to
|
||||
//! will return a valid iterator.
|
||||
//!
|
||||
//! <b>Complexity</b>: Constant
|
||||
bool is_linked() const;
|
||||
|
||||
//! <b>Effects</b>: Removes the node if it's inserted in a container.
|
||||
//! This function is only allowed if link_mode is \c auto_unlink.
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
void unlink();
|
||||
#endif
|
||||
};
|
||||
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_SPLAY_SET_HOOK_HPP
|
@ -13,6 +13,7 @@
|
||||
#define BOOST_INTRUSIVE_SPLAYTREE_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
@ -20,8 +21,6 @@
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/splay_set_hook.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
#include <boost/intrusive/detail/tree_node.hpp>
|
||||
#include <boost/intrusive/detail/ebo_functor_holder.hpp>
|
||||
|
@ -31,8 +31,8 @@
|
||||
#define BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/detail/utilities.hpp>
|
||||
|
@ -13,6 +13,7 @@
|
||||
#define BOOST_INTRUSIVE_TREAP_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
@ -21,7 +22,6 @@
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/bs_set_hook.hpp>
|
||||
#include <boost/intrusive/bstree.hpp>
|
||||
#include <boost/intrusive/detail/tree_node.hpp>
|
||||
|
@ -14,9 +14,9 @@
|
||||
#define BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
|
@ -13,6 +13,9 @@
|
||||
#ifndef BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP
|
||||
#define BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP
|
||||
|
||||
#include <boost/intrusive/detail/config_begin.hpp>
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
|
||||
#include <boost/intrusive/link_mode.hpp>
|
||||
#include <boost/intrusive/pointer_traits.hpp>
|
||||
|
||||
@ -22,7 +25,11 @@ namespace intrusive {
|
||||
//!This value traits template is used to create value traits
|
||||
//!from user defined node traits where value_traits::value_type and
|
||||
//!node_traits::node should be equal
|
||||
template<class NodeTraits, link_mode_type LinkMode = normal_link>
|
||||
template<class NodeTraits, link_mode_type LinkMode
|
||||
#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
|
||||
= safe_link
|
||||
#endif
|
||||
>
|
||||
struct trivial_value_traits
|
||||
{
|
||||
typedef NodeTraits node_traits;
|
||||
@ -43,4 +50,6 @@ struct trivial_value_traits
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/intrusive/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP
|
||||
|
@ -183,12 +183,6 @@ int main()
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(detail::is_same<make_splay_set_base_hook<void_pointer<void*>, link_mode<safe_link> >::type
|
||||
,make_splay_set_base_hook<>::type
|
||||
>::value == false){
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Check defined types and implicitly defined types are unequal
|
||||
if(detail::is_same<make_list_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_list_base_hook<>::type
|
||||
@ -220,12 +214,6 @@ int main()
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(detail::is_same<make_splay_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_splay_set_base_hook<>::type
|
||||
>::value == true){
|
||||
return 1;
|
||||
}
|
||||
|
||||
if(detail::is_same<make_bs_set_base_hook<void_pointer<void*>, link_mode<normal_link> >::type
|
||||
,make_bs_set_base_hook<>::type
|
||||
>::value == true){
|
||||
|
@ -77,15 +77,15 @@ struct my_tag;
|
||||
template<class VoidPointer>
|
||||
struct hooks
|
||||
{
|
||||
typedef splay_set_base_hook<void_pointer<VoidPointer> > base_hook_type;
|
||||
typedef splay_set_base_hook
|
||||
typedef bs_set_base_hook<void_pointer<VoidPointer> > base_hook_type;
|
||||
typedef bs_set_base_hook
|
||||
< link_mode<auto_unlink>
|
||||
, void_pointer<VoidPointer>
|
||||
, tag<my_tag> > auto_base_hook_type;
|
||||
typedef splay_set_member_hook<void_pointer<VoidPointer> > member_hook_type;
|
||||
typedef splay_set_member_hook
|
||||
, tag<my_tag> > auto_base_hook_type;
|
||||
typedef bs_set_member_hook<void_pointer<VoidPointer> > member_hook_type;
|
||||
typedef bs_set_member_hook
|
||||
< link_mode<auto_unlink>
|
||||
, void_pointer<VoidPointer> > auto_member_hook_type;
|
||||
, void_pointer<VoidPointer> > auto_member_hook_type;
|
||||
};
|
||||
|
||||
template< class ValueType
|
||||
|
@ -74,15 +74,15 @@ struct my_tag;
|
||||
template<class VoidPointer>
|
||||
struct hooks
|
||||
{
|
||||
typedef splay_set_base_hook<void_pointer<VoidPointer> > base_hook_type;
|
||||
typedef splay_set_base_hook
|
||||
typedef bs_set_base_hook<void_pointer<VoidPointer> > base_hook_type;
|
||||
typedef bs_set_base_hook
|
||||
< link_mode<auto_unlink>
|
||||
, void_pointer<VoidPointer>
|
||||
, tag<my_tag> > auto_base_hook_type;
|
||||
typedef splay_set_member_hook<void_pointer<VoidPointer> > member_hook_type;
|
||||
typedef splay_set_member_hook
|
||||
, tag<my_tag> > auto_base_hook_type;
|
||||
typedef bs_set_member_hook<void_pointer<VoidPointer> > member_hook_type;
|
||||
typedef bs_set_member_hook
|
||||
< link_mode<auto_unlink>
|
||||
, void_pointer<VoidPointer> > auto_member_hook_type;
|
||||
, void_pointer<VoidPointer> > auto_member_hook_type;
|
||||
};
|
||||
|
||||
template< class ValueType
|
||||
|
Loading…
x
Reference in New Issue
Block a user