summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugaevskiy <[email protected]>2022-08-08 10:54:16 +0300
committerbugaevskiy <[email protected]>2022-08-08 10:54:16 +0300
commit4e8e498caf7c6103294e9e3d3f2b19b0ed784416 (patch)
tree19d04ef662badf4c9ddc4091eb8517d7da5c0e5e
parentba5aa0c93165f068c5f861477a71c945a6041575 (diff)
Reimport boost/intrusive as a separate project
-rw-r--r--CMakeLists.darwin.txt1
-rw-r--r--CMakeLists.linux.txt1
-rw-r--r--contrib/restricted/boost/CMakeLists.txt1
-rw-r--r--contrib/restricted/boost/boost/intrusive/any_hook.hpp338
-rw-r--r--contrib/restricted/boost/boost/intrusive/avl_set.hpp1073
-rw-r--r--contrib/restricted/boost/boost/intrusive/bs_set.hpp1069
-rw-r--r--contrib/restricted/boost/boost/intrusive/detail/any_node_and_algorithms.hpp297
-rw-r--r--contrib/restricted/boost/boost/intrusive/detail/hashtable_node.hpp298
-rw-r--r--contrib/restricted/boost/boost/intrusive/detail/node_to_value.hpp130
-rw-r--r--contrib/restricted/boost/boost/intrusive/detail/transform_iterator.hpp172
-rw-r--r--contrib/restricted/boost/boost/intrusive/hashtable.hpp3668
-rw-r--r--contrib/restricted/boost/boost/intrusive/member_value_traits.hpp85
-rw-r--r--contrib/restricted/boost/boost/intrusive/priority_compare.hpp82
-rw-r--r--contrib/restricted/boost/boost/intrusive/sg_set.hpp1094
-rw-r--r--contrib/restricted/boost/boost/intrusive/splay_set.hpp1110
-rw-r--r--contrib/restricted/boost/boost/intrusive/treap.hpp1344
-rw-r--r--contrib/restricted/boost/boost/intrusive/treap_algorithms.hpp699
-rw-r--r--contrib/restricted/boost/boost/intrusive/treap_set.hpp1106
-rw-r--r--contrib/restricted/boost/boost/intrusive/trivial_value_traits.hpp59
-rw-r--r--contrib/restricted/boost/boost/intrusive/unordered_set.hpp990
-rw-r--r--contrib/restricted/boost/boost/intrusive/unordered_set_hook.hpp459
-rw-r--r--contrib/restricted/boost/intrusive/CMakeLists.txt23
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/avl_set_hook.hpp (renamed from contrib/restricted/boost/boost/intrusive/avl_set_hook.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/avltree.hpp (renamed from contrib/restricted/boost/boost/intrusive/avltree.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/avltree_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/avltree_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/bs_set_hook.hpp (renamed from contrib/restricted/boost/boost/intrusive/bs_set_hook.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/bstree.hpp (renamed from contrib/restricted/boost/boost/intrusive/bstree.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/bstree_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/bstree_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/circular_list_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/circular_list_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/circular_slist_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/circular_slist_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/derivation_value_traits.hpp (renamed from contrib/restricted/boost/boost/intrusive/derivation_value_traits.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/algo_type.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/algo_type.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/algorithm.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/algorithm.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/array_initializer.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/array_initializer.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/assert.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/assert.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/avltree_node.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/avltree_node.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/bstree_algorithms_base.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/bstree_algorithms_base.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/common_slist_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/common_slist_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/config_begin.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/config_begin.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/config_end.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/config_end.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/default_header_holder.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/default_header_holder.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/ebo_functor_holder.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/ebo_functor_holder.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/empty_node_checker.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/empty_node_checker.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/equal_to_value.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/equal_to_value.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/exception_disposer.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/exception_disposer.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/function_detector.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/function_detector.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/generic_hook.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/generic_hook.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/get_value_traits.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/get_value_traits.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/has_member_function_callable_with.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/has_member_function_callable_with.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/hook_traits.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/hook_traits.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/iiterator.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/iiterator.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/is_stateful_value_traits.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/is_stateful_value_traits.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/iterator.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/iterator.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/key_nodeptr_comp.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/key_nodeptr_comp.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/list_iterator.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/list_iterator.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/list_node.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/list_node.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/math.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/math.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/minimal_less_equal_header.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/minimal_less_equal_header.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/minimal_pair_header.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/minimal_pair_header.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/mpl.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/mpl.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/node_cloner_disposer.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/node_cloner_disposer.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/node_holder.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/node_holder.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/parent_from_member.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/parent_from_member.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/rbtree_node.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/rbtree_node.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/reverse_iterator.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/reverse_iterator.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/simple_disposers.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/simple_disposers.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/size_holder.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/size_holder.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/slist_iterator.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/slist_iterator.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/slist_node.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/slist_node.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/std_fwd.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/std_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_iterator.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/tree_iterator.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_node.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/tree_node.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_value_compare.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/tree_value_compare.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/uncast.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/uncast.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/detail/workaround.hpp (renamed from contrib/restricted/boost/boost/intrusive/detail/workaround.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/intrusive_fwd.hpp (renamed from contrib/restricted/boost/boost/intrusive/intrusive_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/linear_slist_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/linear_slist_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/link_mode.hpp (renamed from contrib/restricted/boost/boost/intrusive/link_mode.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/list.hpp (renamed from contrib/restricted/boost/boost/intrusive/list.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/list_hook.hpp (renamed from contrib/restricted/boost/boost/intrusive/list_hook.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/options.hpp (renamed from contrib/restricted/boost/boost/intrusive/options.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/pack_options.hpp (renamed from contrib/restricted/boost/boost/intrusive/pack_options.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/parent_from_member.hpp (renamed from contrib/restricted/boost/boost/intrusive/parent_from_member.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_plus_bits.hpp (renamed from contrib/restricted/boost/boost/intrusive/pointer_plus_bits.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_rebind.hpp (renamed from contrib/restricted/boost/boost/intrusive/pointer_rebind.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_traits.hpp (renamed from contrib/restricted/boost/boost/intrusive/pointer_traits.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/rbtree.hpp (renamed from contrib/restricted/boost/boost/intrusive/rbtree.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/rbtree_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/rbtree_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/set.hpp (renamed from contrib/restricted/boost/boost/intrusive/set.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/set_hook.hpp (renamed from contrib/restricted/boost/boost/intrusive/set_hook.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/sgtree.hpp (renamed from contrib/restricted/boost/boost/intrusive/sgtree.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/sgtree_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/sgtree_algorithms.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/slist.hpp (renamed from contrib/restricted/boost/boost/intrusive/slist.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/slist_hook.hpp (renamed from contrib/restricted/boost/boost/intrusive/slist_hook.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/splaytree.hpp (renamed from contrib/restricted/boost/boost/intrusive/splaytree.hpp)0
-rw-r--r--contrib/restricted/boost/intrusive/include/boost/intrusive/splaytree_algorithms.hpp (renamed from contrib/restricted/boost/boost/intrusive/splaytree_algorithms.hpp)0
96 files changed, 26 insertions, 14073 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt
index 63f45e035ca..499c3e1c61e 100644
--- a/CMakeLists.darwin.txt
+++ b/CMakeLists.darwin.txt
@@ -383,6 +383,7 @@ add_subdirectory(contrib/restricted/boost/optional)
add_subdirectory(contrib/restricted/boost/function_types)
add_subdirectory(contrib/restricted/boost/interval)
add_subdirectory(contrib/restricted/boost/logic)
+add_subdirectory(contrib/restricted/boost/intrusive)
add_subdirectory(contrib/restricted/boost/io)
add_subdirectory(contrib/restricted/boost/mp11)
add_subdirectory(contrib/restricted/boost/numeric_conversion)
diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt
index 52bfb623e79..afb3f6967a9 100644
--- a/CMakeLists.linux.txt
+++ b/CMakeLists.linux.txt
@@ -386,6 +386,7 @@ add_subdirectory(contrib/restricted/boost/optional)
add_subdirectory(contrib/restricted/boost/function_types)
add_subdirectory(contrib/restricted/boost/interval)
add_subdirectory(contrib/restricted/boost/logic)
+add_subdirectory(contrib/restricted/boost/intrusive)
add_subdirectory(contrib/restricted/boost/io)
add_subdirectory(contrib/restricted/boost/mp11)
add_subdirectory(contrib/restricted/boost/numeric_conversion)
diff --git a/contrib/restricted/boost/CMakeLists.txt b/contrib/restricted/boost/CMakeLists.txt
index d49d324a9e0..f1ca5f216d4 100644
--- a/contrib/restricted/boost/CMakeLists.txt
+++ b/contrib/restricted/boost/CMakeLists.txt
@@ -29,6 +29,7 @@ target_link_libraries(contrib-restricted-boost INTERFACE
restricted-boost-function_types
restricted-boost-integer
restricted-boost-interval
+ restricted-boost-intrusive
restricted-boost-io
restricted-boost-move
restricted-boost-mp11
diff --git a/contrib/restricted/boost/boost/intrusive/any_hook.hpp b/contrib/restricted/boost/boost/intrusive/any_hook.hpp
deleted file mode 100644
index 6d187812a6f..00000000000
--- a/contrib/restricted/boost/boost/intrusive/any_hook.hpp
+++ /dev/null
@@ -1,338 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (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_ANY_HOOK_HPP
-#define BOOST_INTRUSIVE_ANY_HOOK_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/any_node_and_algorithms.hpp>
-#include <boost/intrusive/options.hpp>
-#include <boost/intrusive/detail/generic_hook.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! Helper metafunction to define a \c \c any_base_hook that yields to the same
-//! type when the same options (either explicitly or implicitly) are used.
-#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_any_base_hook
-{
- /// @cond
- typedef typename pack_options
- < hook_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef generic_hook
- < AnyAlgorithm
- , any_node_traits<typename packed_options::void_pointer>
- , typename packed_options::tag
- , packed_options::link_mode
- , AnyBaseHookId
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-//! Derive a class from this hook in order to store objects of that class
-//! in an intrusive container.
-//!
-//! The hook admits the following options: \c tag<>, \c void_pointer<> and
-//! \c link_mode<>.
-//!
-//! \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 any_base_hook, then each \c any_base_hook needs its
-//! unique tag.
-//!
-//! \c link_mode<> will specify the linking mode of the hook (\c normal_link, \c safe_link).
-//!
-//! \c void_pointer<> is the pointer type that will be used internally in the hook
-//! and the container configured to use this hook.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1, class O2, class O3>
-#endif
-class any_base_hook
- : public make_any_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 or \c safe_link
- //! initializes the node to an unlinked state.
- //!
- //! <b>Throws</b>: Nothing.
- any_base_hook();
-
- //! <b>Effects</b>: If link_mode is 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.
- any_base_hook(const any_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.
- any_base_hook& operator=(const any_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 container an assertion is raised.
- //!
- //! <b>Throws</b>: Nothing.
- ~any_base_hook();
-
- //! <b>Precondition</b>: link_mode must be \c safe_link.
- //!
- //! <b>Returns</b>: true, if the node belongs to a container, false
- //! otherwise. This function can be used to test whether \c container::iterator_to
- //! will return a valid iterator.
- //!
- //! <b>Complexity</b>: Constant
- bool is_linked() const;
- #endif
-};
-
-//! Helper metafunction to define a \c \c any_member_hook that yields to the same
-//! type when the same options (either explicitly or implicitly) are used.
-#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_any_member_hook
-{
- /// @cond
- typedef typename pack_options
- < hook_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef generic_hook
- < AnyAlgorithm
- , any_node_traits<typename packed_options::void_pointer>
- , member_tag
- , packed_options::link_mode
- , NoBaseHookId
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-//! Store this hook in a class to be inserted
-//! in an intrusive container.
-//!
-//! The hook admits the following options: \c void_pointer<> and
-//! \c link_mode<>.
-//!
-//! \c link_mode<> will specify the linking mode of the hook (\c normal_link or \c safe_link).
-//!
-//! \c void_pointer<> is the pointer type that will be used internally in the hook
-//! and the container configured to use this hook.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1, class O2, class O3>
-#endif
-class any_member_hook
- : public make_any_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 or \c safe_link
- //! initializes the node to an unlinked state.
- //!
- //! <b>Throws</b>: Nothing.
- any_member_hook();
-
- //! <b>Effects</b>: If link_mode is 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.
- any_member_hook(const any_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.
- any_member_hook& operator=(const any_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 container an assertion is raised.
- //!
- //! <b>Throws</b>: Nothing.
- ~any_member_hook();
-
- //! <b>Precondition</b>: link_mode must be \c safe_link.
- //!
- //! <b>Returns</b>: true, if the node belongs to a container, false
- //! otherwise. This function can be used to test whether \c container::iterator_to
- //! will return a valid iterator.
- //!
- //! <b>Complexity</b>: Constant
- bool is_linked() const;
- #endif
-};
-
-/// @cond
-
-namespace detail{
-
-BOOST_INTRUSIVE_INTERNAL_STATIC_BOOL_IS_TRUE(old_proto_value_traits_base_hook, hooktags::is_base_hook)
-
-//!This option setter specifies that the container
-//!must use the specified base hook
-template<class BasicHook, template <class> class NodeTraits>
-struct any_to_some_hook
-{
- typedef typename BasicHook::template pack<empty>::proto_value_traits old_proto_value_traits;
-
- template<class Base>
- struct pack : public Base
- {
- struct proto_value_traits
- {
- //proto_value_traits::hooktags::is_base_hook is used by get_value_traits
- //to detect base hooks, so mark it in case BasicHook has it.
- struct hooktags
- {
- static const bool is_base_hook = old_proto_value_traits_base_hook_bool_is_true
- <old_proto_value_traits>::value;
- };
-
- typedef old_proto_value_traits basic_hook_t;
- static const bool is_any_hook = true;
-
- template<class VoidPtr>
- struct node_traits_from_voidptr
- { typedef NodeTraits<VoidPtr> type; };
- };
- };
-};
-
-} //namespace detail{
-
-/// @endcond
-
-//!This option setter specifies that
-//!any hook should behave as an slist hook
-template<class BasicHook>
-struct any_to_slist_hook
-/// @cond
- : public detail::any_to_some_hook<BasicHook, any_slist_node_traits>
-/// @endcond
-{};
-
-//!This option setter specifies that
-//!any hook should behave as an list hook
-template<class BasicHook>
-struct any_to_list_hook
-/// @cond
- : public detail::any_to_some_hook<BasicHook, any_list_node_traits>
-/// @endcond
-{};
-
-//!This option setter specifies that
-//!any hook should behave as a set hook
-template<class BasicHook>
-struct any_to_set_hook
-/// @cond
- : public detail::any_to_some_hook<BasicHook, any_rbtree_node_traits>
-/// @endcond
-{};
-
-//!This option setter specifies that
-//!any hook should behave as an avl_set hook
-template<class BasicHook>
-struct any_to_avl_set_hook
-/// @cond
- : public detail::any_to_some_hook<BasicHook, any_avltree_node_traits>
-/// @endcond
-{};
-
-//!This option setter specifies that any
-//!hook should behave as a bs_set hook
-template<class BasicHook>
-struct any_to_bs_set_hook
-/// @cond
- : public detail::any_to_some_hook<BasicHook, any_tree_node_traits>
-/// @endcond
-{};
-
-//!This option setter specifies that any hook
-//!should behave as an unordered set hook
-template<class BasicHook>
-struct any_to_unordered_set_hook
-/// @cond
- : public detail::any_to_some_hook<BasicHook, any_unordered_node_traits>
-/// @endcond
-{};
-
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_ANY_HOOK_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/avl_set.hpp b/contrib/restricted/boost/boost/intrusive/avl_set.hpp
deleted file mode 100644
index d150140abd2..00000000000
--- a/contrib/restricted/boost/boost/intrusive/avl_set.hpp
+++ /dev/null
@@ -1,1073 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// 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_AVL_SET_HPP
-#define BOOST_INTRUSIVE_AVL_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/avltree.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class avl_multiset_impl;
-#endif
-
-//! The class template avl_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class avl_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
-
- //! @copydoc ::boost::intrusive::avltree::avltree()
- avl_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(const key_compare &,const value_traits &)
- explicit avl_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- avl_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&)
- avl_set_impl(BOOST_RV_REF(avl_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&)
- avl_set_impl& operator=(BOOST_RV_REF(avl_set_impl) x)
- { return static_cast<avl_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::~avltree()
- ~avl_set_impl();
-
- //! @copydoc ::boost::intrusive::avltree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::avltree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::avltree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::avltree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::avltree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::avltree::begin()
- reverse_iterator avlegin();
-
- //! @copydoc ::boost::intrusive::avltree::begin()const
- const_reverse_iterator avlegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::avltree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::avltree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::avltree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::avltree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::avltree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
- static avl_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
- static const avl_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
- static avl_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
- static const avl_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::avltree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::avltree::swap
- void swap(avl_set_impl& other);
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(const avltree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const avl_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(avltree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::avltree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const key_type &key)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::avltree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::avltree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::avltree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::avltree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::merge_unique
- template<class ...Options2>
- void merge(avl_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::avltree::merge_unique
- template<class ...Options2>
- void merge(avl_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
-
- template<class Compare2>
- void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const avl_set_impl<T, Options...> &x, const avl_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(avl_set_impl<T, Options...> &x, avl_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c set that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_avl_set
-{
- /// @cond
- typedef typename pack_options
- < avltree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef avl_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class avl_set
- : public make_avl_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_avl_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_set)
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- avl_set()
- : Base()
- {}
-
- explicit avl_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- avl_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- avl_set(BOOST_RV_REF(avl_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- avl_set& operator=(BOOST_RV_REF(avl_set) x)
- { return static_cast<avl_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const avl_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static avl_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<avl_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const avl_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const avl_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static avl_set &container_from_iterator(iterator it)
- { return static_cast<avl_set &>(Base::container_from_iterator(it)); }
-
- static const avl_set &container_from_iterator(const_iterator it)
- { return static_cast<const avl_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template avl_multiset is an intrusive container, that mimics most of
-//! the interface of std::_multiset as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class avl_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, AvlTreeAlgorithms, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset_impl)
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::avltree::avltree()
- avl_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(const key_compare &,const value_traits &)
- explicit avl_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- avl_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::avltree::avltree(avltree &&)
- avl_multiset_impl(BOOST_RV_REF(avl_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::avltree::operator=(avltree &&)
- avl_multiset_impl& operator=(BOOST_RV_REF(avl_multiset_impl) x)
- { return static_cast<avl_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::avltree::~avltree()
- ~avl_multiset_impl();
-
- //! @copydoc ::boost::intrusive::avltree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::avltree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::avltree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::avltree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::avltree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::avltree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::avltree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::avltree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::avltree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::avltree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::avltree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::avltree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::avltree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(iterator)
- static avl_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_end_iterator(const_iterator)
- static const avl_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(iterator)
- static avl_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::container_from_iterator(const_iterator)
- static const avl_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::avltree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::avltree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::avltree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::avltree::swap
- void swap(avl_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(const avltree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const avl_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::avltree::clone_from(avltree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::avltree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::avltree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::avltree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::avltree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::avltree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &key upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::avltree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::avltree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::avltree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::avltree::merge_equal
- template<class ...Options2>
- void merge(avl_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::avltree::merge_equal
- template<class ...Options2>
- void merge(avl_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(avl_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(avl_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const avl_multiset_impl<T, Options...> &x, const avl_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(avl_multiset_impl<T, Options...> &x, avl_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c avl_multiset that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_avl_multiset
-{
- /// @cond
- typedef typename pack_options
- < avltree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef avl_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class avl_multiset
- : public make_avl_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_avl_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(avl_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- avl_multiset()
- : Base()
- {}
-
- explicit avl_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- avl_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- avl_multiset(BOOST_RV_REF(avl_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- avl_multiset& operator=(BOOST_RV_REF(avl_multiset) x)
- { return static_cast<avl_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const avl_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(avl_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static avl_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const avl_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const avl_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static avl_multiset &container_from_iterator(iterator it)
- { return static_cast<avl_multiset &>(Base::container_from_iterator(it)); }
-
- static const avl_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const avl_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_AVL_SET_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/bs_set.hpp b/contrib/restricted/boost/boost/intrusive/bs_set.hpp
deleted file mode 100644
index 693b6d855c6..00000000000
--- a/contrib/restricted/boost/boost/intrusive/bs_set.hpp
+++ /dev/null
@@ -1,1069 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2013-2014
-//
-// 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_BS_SET_HPP
-#define BOOST_INTRUSIVE_BS_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class bs_multiset_impl;
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! The class template bs_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class bs_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_set_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::bstree::bstree()
- bs_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit bs_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- bs_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- bs_set_impl(BOOST_RV_REF(bs_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- bs_set_impl& operator=(BOOST_RV_REF(bs_set_impl) x)
- { return static_cast<bs_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~bs_set_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static bs_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const bs_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static bs_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const bs_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(bs_set_impl& other);
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const bs_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type&,const key_type&,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type& lower_key, const key_type& upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type&,const key_type&,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type& lower_key, const key_type& upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::merge_unique
- template<class ...Options2>
- void merge(bs_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::bstree::merge_unique
- template<class ...Options2>
- void merge(bs_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
-
- template<class Compare2>
- void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const bs_set_impl<T, Options...> &x, const bs_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(bs_set_impl<T, Options...> &x, bs_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c bs_set that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_bs_set
-{
- /// @cond
- typedef typename pack_options
- < bstree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef bs_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class bs_set
- : public make_bs_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_bs_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_set)
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::key_compare key_compare;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- bs_set()
- : Base()
- {}
-
- explicit bs_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- bs_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- bs_set(BOOST_RV_REF(bs_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- bs_set& operator=(BOOST_RV_REF(bs_set) x)
- { return static_cast<bs_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const bs_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static bs_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<bs_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const bs_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const bs_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static bs_set &container_from_iterator(iterator it)
- { return static_cast<bs_set &>(Base::container_from_iterator(it)); }
-
- static const bs_set &container_from_iterator(const_iterator it)
- { return static_cast<const bs_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template bs_multiset is an intrusive container, that mimics most of
-//! the interface of std::multiset as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class bs_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
-#endif
-{
- /// @cond
- typedef bstree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_multiset_impl)
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::bstree::bstree()
- bs_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(const key_compare &,const value_traits &)
- explicit bs_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- bs_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- bs_multiset_impl(BOOST_RV_REF(bs_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- bs_multiset_impl& operator=(BOOST_RV_REF(bs_multiset_impl) x)
- { return static_cast<bs_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~bs_multiset_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static bs_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const bs_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static bs_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const bs_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::bstree::swap
- void swap(bs_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(const bstree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const bs_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree::clone_from(bstree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::bstree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::bstree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type & lower_key, const key_type & upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type & lower_key, const key_type & upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::merge_equal
- template<class ...Options2>
- void merge(bs_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::bstree::merge_equal
- template<class ...Options2>
- void merge(bs_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(bs_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(bs_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const bs_multiset_impl<T, Options...> &x, const bs_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(bs_multiset_impl<T, Options...> &x, bs_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c bs_multiset that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_bs_multiset
-{
- /// @cond
- typedef typename pack_options
- < bstree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef bs_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class bs_multiset
- : public make_bs_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_bs_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(bs_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- bs_multiset()
- : Base()
- {}
-
- explicit bs_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- bs_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- bs_multiset(BOOST_RV_REF(bs_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- bs_multiset& operator=(BOOST_RV_REF(bs_multiset) x)
- { return static_cast<bs_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const bs_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(bs_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static bs_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const bs_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const bs_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static bs_multiset &container_from_iterator(iterator it)
- { return static_cast<bs_multiset &>(Base::container_from_iterator(it)); }
-
- static const bs_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const bs_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_BS_SET_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/detail/any_node_and_algorithms.hpp b/contrib/restricted/boost/boost/intrusive/detail/any_node_and_algorithms.hpp
deleted file mode 100644
index 26a1edcd3ea..00000000000
--- a/contrib/restricted/boost/boost/intrusive/detail/any_node_and_algorithms.hpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// 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_ANY_NODE_HPP
-#define BOOST_INTRUSIVE_ANY_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <cstddef>
-
-namespace boost {
-namespace intrusive {
-
-template<class VoidPointer>
-struct any_node
-{
- typedef any_node node;
- typedef typename pointer_rebind<VoidPointer, node>::type node_ptr;
- typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
- node_ptr node_ptr_1;
- node_ptr node_ptr_2;
- node_ptr node_ptr_3;
- std::size_t size_t_1;
-};
-
-template<class VoidPointer>
-struct any_list_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->node_ptr_1 = next; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_previous(const node_ptr & n, const node_ptr & prev)
- { n->node_ptr_2 = prev; }
-};
-
-
-template<class VoidPointer>
-struct any_slist_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->node_ptr_1 = next; }
-};
-
-
-template<class VoidPointer>
-struct any_unordered_node_traits
- : public any_slist_node_traits<VoidPointer>
-{
- typedef any_slist_node_traits<VoidPointer> reduced_slist_node_traits;
- typedef typename reduced_slist_node_traits::node node;
- typedef typename reduced_slist_node_traits::node_ptr node_ptr;
- typedef typename reduced_slist_node_traits::const_node_ptr const_node_ptr;
-
- static const bool store_hash = true;
- static const bool optimize_multikey = true;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->node_ptr_1 = next; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(const node_ptr & n, const node_ptr & prev)
- { n->node_ptr_2 = prev; }
-
- BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n)
- { return n->size_t_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_hash(const node_ptr & n, std::size_t h)
- { n->size_t_1 = h; }
-};
-
-
-template<class VoidPointer>
-struct any_rbtree_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- typedef std::size_t color;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->node_ptr_1 = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->node_ptr_2 = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->node_ptr_3; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->node_ptr_3 = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
- { return n->size_t_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
- { n->size_t_1 = c; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color black()
- { return 0u; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color red()
- { return 1u; }
-};
-
-
-template<class VoidPointer>
-struct any_avltree_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- typedef std::size_t balance;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->node_ptr_1 = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->node_ptr_2 = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->node_ptr_3; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->node_ptr_3 = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
- { return n->size_t_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
- { n->size_t_1 = b; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance negative()
- { return 0u; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance zero()
- { return 1u; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance positive()
- { return 2u; }
-};
-
-
-template<class VoidPointer>
-struct any_tree_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->node_ptr_1 = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->node_ptr_2 = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->node_ptr_3; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->node_ptr_3 = r; }
-};
-
-template<class VoidPointer>
-class any_node_traits
-{
- public:
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-};
-
-template<class VoidPointer>
-class any_algorithms
-{
- template <class T>
- static void function_not_available_for_any_hooks(typename detail::enable_if<detail::is_same<T, bool> >::type)
- {}
-
- public:
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
- typedef any_node_traits<VoidPointer> node_traits;
-
- //! <b>Requires</b>: node must not be part of any tree.
- //!
- //! <b>Effects</b>: After the function unique(node) == true.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
- BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & node)
- { node->node_ptr_1 = node_ptr(); };
-
- //! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
- { return !node->node_ptr_1; };
-
- BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
- { return !node->node_ptr_1; }
-
- static void unlink(const node_ptr &)
- {
- //Auto-unlink hooks and unlink() are not available for any hooks
- any_algorithms<VoidPointer>::template function_not_available_for_any_hooks<node_ptr>();
- }
-
- static void swap_nodes(const node_ptr &, const node_ptr &)
- {
- //Any nodes have no swap_nodes capability because they don't know
- //what algorithm they must use to unlink the node from the container
- any_algorithms<VoidPointer>::template function_not_available_for_any_hooks<node_ptr>();
- }
-};
-
-///@cond
-
-template<class NodeTraits>
-struct get_algo<AnyAlgorithm, NodeTraits>
-{
- typedef typename pointer_rebind<typename NodeTraits::node_ptr, void>::type void_pointer;
- typedef any_algorithms<void_pointer> type;
-};
-
-///@endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_ANY_NODE_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/detail/hashtable_node.hpp b/contrib/restricted/boost/boost/intrusive/detail/hashtable_node.hpp
deleted file mode 100644
index 1d08d7537f0..00000000000
--- a/contrib/restricted/boost/boost/intrusive/detail/hashtable_node.hpp
+++ /dev/null
@@ -1,298 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// 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_HASHTABLE_NODE_HPP
-#define BOOST_INTRUSIVE_HASHTABLE_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#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 <cstddef>
-#include <climits>
-#include <boost/move/core.hpp>
-
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-template <class Slist>
-struct bucket_impl : public Slist
-{
- typedef Slist slist_type;
- BOOST_INTRUSIVE_FORCEINLINE bucket_impl()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_impl(const bucket_impl &)
- {}
-
- 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;
- }
-};
-
-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 const bucket_ptr &bucket_begin() const
- { return buckets_; }
-
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
- { return buckets_len_; }
-
- private:
- bucket_ptr buckets_;
- size_type buckets_len_;
-};
-
-template <class NodeTraits>
-struct hash_reduced_slist_node_traits
-{
- template <class U> static detail::no_type test(...);
- template <class U> static detail::yes_type test(typename U::reduced_slist_node_traits*);
- static const bool value = sizeof(test<NodeTraits>(0)) == sizeof(detail::yes_type);
-};
-
-template <class NodeTraits>
-struct apply_reduced_slist_node_traits
-{
- typedef typename NodeTraits::reduced_slist_node_traits type;
-};
-
-template <class NodeTraits>
-struct reduced_slist_node_traits
-{
- typedef typename detail::eval_if_c
- < hash_reduced_slist_node_traits<NodeTraits>::value
- , apply_reduced_slist_node_traits<NodeTraits>
- , detail::identity<NodeTraits>
- >::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
- {};
-};
-
-} //namespace detail {
-
-template<class BucketValueTraits, bool IsConst>
-class hashtable_iterator
-{
- 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 detail::get_slist_impl
- < typename detail::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 detail::bucket_impl<slist_impl> bucket_type;
-
- 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>
- , nat>::type nonconst_iterator;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr downcast_bucket(typename bucket_type::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)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit hashtable_iterator(siterator ptr, const BucketValueTraits *cont)
- : slist_it_ (ptr)
- , traitsptr_ (cont ? pointer_traits<const_bucketvaltraits_ptr>::pointer_to(*cont) : const_bucketvaltraits_ptr() )
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const hashtable_iterator &other)
- : slist_it_(other.slist_it()), traitsptr_(other.get_bucket_value_traits())
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator(const nonconst_iterator &other)
- : slist_it_(other.slist_it()), traitsptr_(other.get_bucket_value_traits())
- {}
-
- 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& operator++()
- { this->increment(); return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable_iterator &operator=(const hashtable_iterator &other)
- { slist_it_ = other.slist_it(); traitsptr_ = other.get_bucket_value_traits(); 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->priv_value_traits().to_value_ptr
- (downcast_bucket(slist_it_.pointed_node()));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE const const_bucketvaltraits_ptr &get_bucket_value_traits() const
- { return traitsptr_; }
-
- BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
- { return traitsptr_->priv_value_traits(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
- { 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();
-
- ++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()){
- //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_));
-
- //2. Now just calculate the index b has in the bucket array
- size_type n_bucket = static_cast<size_type>(&b - buckets);
-
- //3. Iterate until a non-empty bucket is found
- do{
- if (++n_bucket >= buckets_len){ //bucket overflow, return end() iterator
- slist_it_ = buckets->before_begin();
- return;
- }
- }
- while (buckets[n_bucket].empty());
- slist_it_ = buckets[n_bucket].begin();
- }
- else{
- //++slist_it_ yield to a valid object
- }
- }
-
- siterator slist_it_;
- const_bucketvaltraits_ptr traitsptr_;
-};
-
-} //namespace intrusive {
-} //namespace boost {
-
-#endif
diff --git a/contrib/restricted/boost/boost/intrusive/detail/node_to_value.hpp b/contrib/restricted/boost/boost/intrusive/detail/node_to_value.hpp
deleted file mode 100644
index 218e78e4e0e..00000000000
--- a/contrib/restricted/boost/boost/intrusive/detail/node_to_value.hpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2014-2014
-//
-// 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_DETAIL_NODE_TO_VALUE_HPP
-#define BOOST_INTRUSIVE_DETAIL_NODE_TO_VALUE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-template<class VoidPointer>
-struct dummy_constptr
-{
- typedef typename boost::intrusive::pointer_traits<VoidPointer>::
- template rebind_pointer<const void>::type ConstVoidPtr;
-
- explicit dummy_constptr(ConstVoidPtr)
- {}
-
- dummy_constptr()
- {}
-
- ConstVoidPtr get_ptr() const
- { return ConstVoidPtr(); }
-};
-
-template<class VoidPointer>
-struct constptr
-{
- typedef typename boost::intrusive::pointer_traits<VoidPointer>::
- template rebind_pointer<const void>::type ConstVoidPtr;
-
- constptr()
- {}
-
- explicit constptr(const ConstVoidPtr &ptr)
- : const_void_ptr_(ptr)
- {}
-
- const void *get_ptr() const
- { return boost::movelib::to_raw_pointer(const_void_ptr_); }
-
- ConstVoidPtr const_void_ptr_;
-};
-
-template <class VoidPointer, bool store_ptr>
-struct select_constptr
-{
- typedef typename if_c
- < store_ptr
- , constptr<VoidPointer>
- , dummy_constptr<VoidPointer>
- >::type type;
-};
-
-
-template<class ValueTraits, bool IsConst>
-struct node_to_value
- : public select_constptr
- < typename pointer_traits
- <typename ValueTraits::pointer>::template rebind_pointer<void>::type
- , is_stateful_value_traits<ValueTraits>::value
- >::type
-{
- static const bool stateful_value_traits = is_stateful_value_traits<ValueTraits>::value;
- typedef typename select_constptr
- < typename pointer_traits
- <typename ValueTraits::pointer>::
- template rebind_pointer<void>::type
- , stateful_value_traits >::type Base;
-
- typedef ValueTraits value_traits;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::node_traits::node node;
- typedef typename add_const_if_c
- <value_type, IsConst>::type vtype;
- typedef typename add_const_if_c
- <node, IsConst>::type ntype;
- typedef typename pointer_traits
- <typename ValueTraits::pointer>::
- template rebind_pointer<ntype>::type npointer;
- typedef typename pointer_traits<npointer>::
- template rebind_pointer<const ValueTraits>::type const_value_traits_ptr;
-
- node_to_value(const const_value_traits_ptr &ptr)
- : Base(ptr)
- {}
-
- typedef vtype & result_type;
- typedef ntype & first_argument_type;
-
- const_value_traits_ptr get_value_traits() const
- { return pointer_traits<const_value_traits_ptr>::static_cast_from(Base::get_ptr()); }
-
- result_type to_value(first_argument_type arg, false_) const
- { return *(value_traits::to_value_ptr(pointer_traits<npointer>::pointer_to(arg))); }
-
- result_type to_value(first_argument_type arg, true_) const
- { return *(this->get_value_traits()->to_value_ptr(pointer_traits<npointer>::pointer_to(arg))); }
-
- result_type operator()(first_argument_type arg) const
- { return this->to_value(arg, bool_<stateful_value_traits>()); }
-};
-
-} //namespace detail{
-} //namespace intrusive{
-} //namespace boost{
-
-#endif //BOOST_INTRUSIVE_DETAIL_NODE_TO_VALUE_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/detail/transform_iterator.hpp b/contrib/restricted/boost/boost/intrusive/detail/transform_iterator.hpp
deleted file mode 100644
index 0a715754d71..00000000000
--- a/contrib/restricted/boost/boost/intrusive/detail/transform_iterator.hpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-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_DETAIL_TRANSFORM_ITERATOR_HPP
-#define BOOST_INTRUSIVE_DETAIL_TRANSFORM_ITERATOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/iterator.hpp>
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-template <class PseudoReference>
-struct operator_arrow_proxy
-{
- BOOST_INTRUSIVE_FORCEINLINE operator_arrow_proxy(const PseudoReference &px)
- : m_value(px)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE PseudoReference* operator->() const { return &m_value; }
- // This function is needed for MWCW and BCC, which won't call operator->
- // again automatically per 13.3.1.2 para 8
-// operator T*() const { return &m_value; }
- mutable PseudoReference m_value;
-};
-
-template <class T>
-struct operator_arrow_proxy<T&>
-{
- BOOST_INTRUSIVE_FORCEINLINE operator_arrow_proxy(T &px)
- : m_value(px)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE T* operator->() const { return &m_value; }
- // This function is needed for MWCW and BCC, which won't call operator->
- // again automatically per 13.3.1.2 para 8
-// operator T*() const { return &m_value; }
- T &m_value;
-};
-
-template <class Iterator, class UnaryFunction>
-class transform_iterator
-{
- public:
- typedef typename Iterator::iterator_category iterator_category;
- typedef typename detail::remove_reference<typename UnaryFunction::result_type>::type value_type;
- typedef typename Iterator::difference_type difference_type;
- typedef operator_arrow_proxy<typename UnaryFunction::result_type> pointer;
- typedef typename UnaryFunction::result_type reference;
-
- explicit transform_iterator(const Iterator &it, const UnaryFunction &f = UnaryFunction())
- : members_(it, f)
- {}
-
- explicit transform_iterator()
- : members_()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE Iterator get_it() const
- { return members_.m_it; }
-
- //Constructors
- BOOST_INTRUSIVE_FORCEINLINE transform_iterator& operator++()
- { increment(); return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE transform_iterator operator++(int)
- {
- transform_iterator result (*this);
- increment();
- return result;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const transform_iterator& i, const transform_iterator& i2)
- { return i.equal(i2); }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const transform_iterator& i, const transform_iterator& i2)
- { return !(i == i2); }
-
- BOOST_INTRUSIVE_FORCEINLINE friend typename Iterator::difference_type operator- (const transform_iterator& i, const transform_iterator& i2)
- { return i2.distance_to(i); }
-
- //Arithmetic
- transform_iterator& operator+=(typename Iterator::difference_type off)
- { this->advance(off); return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE transform_iterator operator+(typename Iterator::difference_type off) const
- {
- transform_iterator other(*this);
- other.advance(off);
- return other;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE friend transform_iterator operator+(typename Iterator::difference_type off, const transform_iterator& right)
- { return right + off; }
-
- BOOST_INTRUSIVE_FORCEINLINE transform_iterator& operator-=(typename Iterator::difference_type off)
- { this->advance(-off); return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE transform_iterator operator-(typename Iterator::difference_type off) const
- { return *this + (-off); }
-
- BOOST_INTRUSIVE_FORCEINLINE typename UnaryFunction::result_type operator*() const
- { return dereference(); }
-
- BOOST_INTRUSIVE_FORCEINLINE operator_arrow_proxy<typename UnaryFunction::result_type>
- operator->() const
- { return operator_arrow_proxy<typename UnaryFunction::result_type>(dereference()); }
-
- private:
- struct members
- : UnaryFunction
- {
- BOOST_INTRUSIVE_FORCEINLINE members(const Iterator &it, const UnaryFunction &f)
- : UnaryFunction(f), m_it(it)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE members()
- {}
-
- Iterator m_it;
- } members_;
-
-
- BOOST_INTRUSIVE_FORCEINLINE void increment()
- { ++members_.m_it; }
-
- BOOST_INTRUSIVE_FORCEINLINE void decrement()
- { --members_.m_it; }
-
- BOOST_INTRUSIVE_FORCEINLINE bool equal(const transform_iterator &other) const
- { return members_.m_it == other.members_.m_it; }
-
- BOOST_INTRUSIVE_FORCEINLINE bool less(const transform_iterator &other) const
- { return other.members_.m_it < members_.m_it; }
-
- typename UnaryFunction::result_type dereference() const
- { return members_(*members_.m_it); }
-
- void advance(typename Iterator::difference_type n)
- { boost::intrusive::iterator_advance(members_.m_it, n); }
-
- typename Iterator::difference_type distance_to(const transform_iterator &other)const
- { return boost::intrusive::iterator_distance(other.members_.m_it, members_.m_it); }
-};
-
-} //namespace detail
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_DETAIL_TRANSFORM_ITERATOR_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/hashtable.hpp b/contrib/restricted/boost/boost/intrusive/hashtable.hpp
deleted file mode 100644
index 258e6012561..00000000000
--- a/contrib/restricted/boost/boost/intrusive/hashtable.hpp
+++ /dev/null
@@ -1,3668 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2015
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_INTRUSIVE_HASHTABLE_HPP
-#define BOOST_INTRUSIVE_HASHTABLE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-//General intrusive utilities
-#include <boost/intrusive/detail/hashtable_node.hpp>
-#include <boost/intrusive/detail/transform_iterator.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
-#include <boost/intrusive/detail/node_to_value.hpp>
-#include <boost/intrusive/detail/exception_disposer.hpp>
-#include <boost/intrusive/detail/node_cloner_disposer.hpp>
-#include <boost/intrusive/detail/simple_disposers.hpp>
-#include <boost/intrusive/detail/size_holder.hpp>
-#include <boost/intrusive/detail/iterator.hpp>
-
-//Implementation utilities
-#include <boost/intrusive/unordered_set_hook.hpp>
-#include <boost/intrusive/slist.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-
-//boost
-#include <boost/functional/hash.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/move/adl_move_swap.hpp>
-
-//std C++
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp> //std::equal_to
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-#include <algorithm> //std::lower_bound, std::upper_bound
-#include <cstddef> //std::size_t
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class InputIt, class T>
-InputIt priv_algo_find(InputIt first, InputIt last, const T& value)
-{
- for (; first != last; ++first) {
- if (*first == value) {
- return first;
- }
- }
- return last;
-}
-
-template<class InputIt, class T>
-typename boost::intrusive::iterator_traits<InputIt>::difference_type
- priv_algo_count(InputIt first, InputIt last, const T& value)
-{
- typename boost::intrusive::iterator_traits<InputIt>::difference_type ret = 0;
- for (; first != last; ++first) {
- if (*first == value) {
- ret++;
- }
- }
- return ret;
-}
-
-template <class ForwardIterator1, class ForwardIterator2>
-bool priv_algo_is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2)
-{
- typedef typename
- boost::intrusive::iterator_traits<ForwardIterator2>::difference_type
- distance_type;
- //Efficiently compare identical prefixes: O(N) if sequences
- //have the same elements in the same order.
- for ( ; first1 != last1; ++first1, ++first2){
- if (! (*first1 == *first2))
- break;
- }
- if (first1 == last1){
- return true;
- }
-
- //Establish last2 assuming equal ranges by iterating over the
- //rest of the list.
- ForwardIterator2 last2 = first2;
- boost::intrusive::iterator_advance(last2, boost::intrusive::iterator_distance(first1, last1));
- for(ForwardIterator1 scan = first1; scan != last1; ++scan){
- if (scan != (priv_algo_find)(first1, scan, *scan)){
- continue; //We've seen this one before.
- }
- distance_type matches = (priv_algo_count)(first2, last2, *scan);
- if (0 == matches || (priv_algo_count)(scan, last1, *scan != matches)){
- return false;
- }
- }
- return true;
-}
-
-template<int Dummy = 0>
-struct prime_list_holder
-{
- private:
-
- template <class SizeType> // sizeof(SizeType) < sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType truncate_size_type(std::size_t n, detail::true_)
- {
- return n < std::size_t(SizeType(-1)) ? static_cast<SizeType>(n) : SizeType(-1);
- }
-
- template <class SizeType> // sizeof(SizeType) == sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType truncate_size_type(std::size_t n, detail::false_)
- {
- return static_cast<SizeType>(n);
- }
-
- template <class SizeType> //sizeof(SizeType) > sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count_dispatch(SizeType n, detail::true_)
- {
- std::size_t const c = n > std::size_t(-1)
- ? std::size_t(-1)
- : suggested_upper_bucket_count_impl(static_cast<std::size_t>(n));
- return static_cast<SizeType>(c);
- }
-
- template <class SizeType> //sizeof(SizeType) > sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count_dispatch(SizeType n, detail::true_)
- {
- std::size_t const c = n > std::size_t(-1)
- ? std::size_t(-1)
- : suggested_lower_bucket_count_impl(static_cast<std::size_t>(n));
- return static_cast<SizeType>(c);
- }
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count_dispatch(SizeType n, detail::false_)
- {
- std::size_t const c = suggested_upper_bucket_count_impl(static_cast<std::size_t>(n));
- return truncate_size_type<SizeType>(c, detail::bool_<(sizeof(SizeType) < sizeof(std::size_t))>());
-
- }
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count_dispatch(SizeType n, detail::false_)
- {
- std::size_t const c = suggested_lower_bucket_count_impl(static_cast<std::size_t>(n));
- return truncate_size_type<SizeType>(c, detail::bool_<(sizeof(SizeType) < sizeof(std::size_t))>());
- }
-
- static const std::size_t prime_list[];
- static const std::size_t prime_list_size;
-
- static std::size_t suggested_lower_bucket_count_impl(std::size_t n)
- {
- const std::size_t *primes = &prime_list_holder<0>::prime_list[0];
- const std::size_t *primes_end = primes + prime_list_holder<0>::prime_list_size;
- std::size_t const* bound = std::lower_bound(primes, primes_end, n);
- //Tables have upper SIZE_MAX, so we must always found an entry
- BOOST_INTRUSIVE_INVARIANT_ASSERT(bound != primes_end);
- bound -= std::size_t(bound != primes);
- return *bound;
- }
-
- static std::size_t suggested_upper_bucket_count_impl(std::size_t n)
- {
- const std::size_t *primes = &prime_list_holder<0>::prime_list[0];
- const std::size_t *primes_end = primes + prime_list_holder<0>::prime_list_size;
- std::size_t const* bound = std::upper_bound(primes, primes_end, n);
- bound -= std::size_t(bound == primes_end);
- return *bound;
- }
-
- public:
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count(SizeType n)
- {
- return (suggested_upper_bucket_count_dispatch)(n, detail::bool_<(sizeof(SizeType) > sizeof(std::size_t))>());
- }
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count(SizeType n)
- {
- return (suggested_lower_bucket_count_dispatch)(n, detail::bool_<(sizeof(SizeType) > sizeof(std::size_t))>());
- }
-};
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//We only support LLP64(Win64) or LP64(most Unix) data models
-#ifdef _WIN64 //In 64 bit windows sizeof(size_t) == sizeof(unsigned long long)
- #define BOOST_INTRUSIVE_PRIME_C(NUMBER) NUMBER##ULL
- #define BOOST_INTRUSIVE_64_BIT_SIZE_T 1
-#else //In 32 bit windows and 32/64 bit unixes sizeof(size_t) == sizeof(unsigned long)
- #define BOOST_INTRUSIVE_PRIME_C(NUMBER) NUMBER##UL
- #define BOOST_INTRUSIVE_64_BIT_SIZE_T (((((ULONG_MAX>>16)>>16)>>16)>>15) != 0)
-#endif
-
-template<int Dummy>
-const std::size_t prime_list_holder<Dummy>::prime_list[] = {
- BOOST_INTRUSIVE_PRIME_C(3), BOOST_INTRUSIVE_PRIME_C(7),
- BOOST_INTRUSIVE_PRIME_C(11), BOOST_INTRUSIVE_PRIME_C(17),
- BOOST_INTRUSIVE_PRIME_C(29), BOOST_INTRUSIVE_PRIME_C(53),
- BOOST_INTRUSIVE_PRIME_C(97), BOOST_INTRUSIVE_PRIME_C(193),
- BOOST_INTRUSIVE_PRIME_C(389), BOOST_INTRUSIVE_PRIME_C(769),
- BOOST_INTRUSIVE_PRIME_C(1543), BOOST_INTRUSIVE_PRIME_C(3079),
- BOOST_INTRUSIVE_PRIME_C(6151), BOOST_INTRUSIVE_PRIME_C(12289),
- BOOST_INTRUSIVE_PRIME_C(24593), BOOST_INTRUSIVE_PRIME_C(49157),
- BOOST_INTRUSIVE_PRIME_C(98317), BOOST_INTRUSIVE_PRIME_C(196613),
- BOOST_INTRUSIVE_PRIME_C(393241), BOOST_INTRUSIVE_PRIME_C(786433),
- BOOST_INTRUSIVE_PRIME_C(1572869), BOOST_INTRUSIVE_PRIME_C(3145739),
- BOOST_INTRUSIVE_PRIME_C(6291469), BOOST_INTRUSIVE_PRIME_C(12582917),
- BOOST_INTRUSIVE_PRIME_C(25165843), BOOST_INTRUSIVE_PRIME_C(50331653),
- BOOST_INTRUSIVE_PRIME_C(100663319), BOOST_INTRUSIVE_PRIME_C(201326611),
- BOOST_INTRUSIVE_PRIME_C(402653189), BOOST_INTRUSIVE_PRIME_C(805306457),
- BOOST_INTRUSIVE_PRIME_C(1610612741), BOOST_INTRUSIVE_PRIME_C(3221225473),
-#if BOOST_INTRUSIVE_64_BIT_SIZE_T
- //Taken from Boost.MultiIndex code, thanks to Joaquin M Lopez Munoz.
- BOOST_INTRUSIVE_PRIME_C(6442450939), BOOST_INTRUSIVE_PRIME_C(12884901893),
- BOOST_INTRUSIVE_PRIME_C(25769803751), BOOST_INTRUSIVE_PRIME_C(51539607551),
- BOOST_INTRUSIVE_PRIME_C(103079215111), BOOST_INTRUSIVE_PRIME_C(206158430209),
- BOOST_INTRUSIVE_PRIME_C(412316860441), BOOST_INTRUSIVE_PRIME_C(824633720831),
- BOOST_INTRUSIVE_PRIME_C(1649267441651), BOOST_INTRUSIVE_PRIME_C(3298534883309),
- BOOST_INTRUSIVE_PRIME_C(6597069766657), BOOST_INTRUSIVE_PRIME_C(13194139533299),
- BOOST_INTRUSIVE_PRIME_C(26388279066623), BOOST_INTRUSIVE_PRIME_C(52776558133303),
- BOOST_INTRUSIVE_PRIME_C(105553116266489), BOOST_INTRUSIVE_PRIME_C(211106232532969),
- BOOST_INTRUSIVE_PRIME_C(422212465066001), BOOST_INTRUSIVE_PRIME_C(844424930131963),
- BOOST_INTRUSIVE_PRIME_C(1688849860263953), BOOST_INTRUSIVE_PRIME_C(3377699720527861),
- BOOST_INTRUSIVE_PRIME_C(6755399441055731), BOOST_INTRUSIVE_PRIME_C(13510798882111483),
- BOOST_INTRUSIVE_PRIME_C(27021597764222939), BOOST_INTRUSIVE_PRIME_C(54043195528445957),
- BOOST_INTRUSIVE_PRIME_C(108086391056891903), BOOST_INTRUSIVE_PRIME_C(216172782113783843),
- BOOST_INTRUSIVE_PRIME_C(432345564227567621), BOOST_INTRUSIVE_PRIME_C(864691128455135207),
- BOOST_INTRUSIVE_PRIME_C(1729382256910270481), BOOST_INTRUSIVE_PRIME_C(3458764513820540933),
- BOOST_INTRUSIVE_PRIME_C(6917529027641081903), BOOST_INTRUSIVE_PRIME_C(13835058055282163729),
- BOOST_INTRUSIVE_PRIME_C(18446744073709551557), BOOST_INTRUSIVE_PRIME_C(18446744073709551615) //Upper limit, just in case
-#else
- BOOST_INTRUSIVE_PRIME_C(4294967291), BOOST_INTRUSIVE_PRIME_C(4294967295) //Upper limit, just in case
-#endif
- };
-
-#undef BOOST_INTRUSIVE_PRIME_C
-#undef BOOST_INTRUSIVE_64_BIT_SIZE_T
-
-#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<int Dummy>
-const std::size_t prime_list_holder<Dummy>::prime_list_size
- = sizeof(prime_list)/sizeof(std::size_t);
-
-struct hash_bool_flags
-{
- static const std::size_t unique_keys_pos = 1u;
- static const std::size_t constant_time_size_pos = 2u;
- static const std::size_t power_2_buckets_pos = 4u;
- static const std::size_t cache_begin_pos = 8u;
- static const std::size_t compare_hash_pos = 16u;
- static const std::size_t incremental_pos = 32u;
-};
-
-namespace detail {
-
-template<class SupposedValueTraits>
-struct get_slist_impl_from_supposed_value_traits
-{
- typedef SupposedValueTraits value_traits;
- typedef typename detail::get_node_traits
- <value_traits>::type node_traits;
- typedef typename get_slist_impl
- <typename reduced_slist_node_traits
- <node_traits>::type
- >::type type;
-};
-
-template<class SupposedValueTraits>
-struct unordered_bucket_impl
-{
- typedef typename
- get_slist_impl_from_supposed_value_traits
- <SupposedValueTraits>::type slist_impl;
- typedef detail::bucket_impl<slist_impl> implementation_defined;
- typedef implementation_defined type;
-};
-
-template<class SupposedValueTraits>
-struct unordered_bucket_ptr_impl
-{
- typedef typename detail::get_node_traits
- <SupposedValueTraits>::type::node_ptr node_ptr;
- typedef typename unordered_bucket_impl
- <SupposedValueTraits>::type bucket_type;
-
- typedef typename pointer_traits
- <node_ptr>::template rebind_pointer
- < bucket_type >::type implementation_defined;
- typedef implementation_defined type;
-};
-
-template <class T>
-struct store_hash_is_true
-{
- template<bool Add>
- struct two_or_three {yes_type _[2 + Add];};
- template <class U> static yes_type test(...);
- template <class U> static two_or_three<U::store_hash> test (int);
- static const bool value = sizeof(test<T>(0)) > sizeof(yes_type)*2;
-};
-
-template <class T>
-struct optimize_multikey_is_true
-{
- template<bool Add>
- struct two_or_three {yes_type _[2 + Add];};
- template <class U> static yes_type test(...);
- template <class U> static two_or_three<U::optimize_multikey> test (int);
- static const bool value = sizeof(test<T>(0)) > sizeof(yes_type)*2;
-};
-
-struct insert_commit_data_impl
-{
- std::size_t hash;
-};
-
-template<class Node, class SlistNodePtr>
-BOOST_INTRUSIVE_FORCEINLINE typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type
- dcast_bucket_ptr(const SlistNodePtr &p)
-{
- typedef typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type node_ptr;
- return pointer_traits<node_ptr>::pointer_to(static_cast<Node&>(*p));
-}
-
-template<class NodeTraits>
-struct group_functions
-{
- // A group is reverse-linked
- //
- // A is "first in group"
- // C is "last in group"
- // __________________
- // | _____ _____ |
- // | | | | | | <- Group links
- // ^ V ^ V ^ V
- // _ _ _ _
- // A|_| B|_| C|_| D|_|
- //
- // ^ | ^ | ^ | ^ V <- Bucket links
- // _ _____| |_____| |______| |____| |
- // |B| |
- // ^________________________________|
- //
-
- typedef NodeTraits node_traits;
- typedef unordered_group_adapter<node_traits> group_traits;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::node node;
- typedef typename reduced_slist_node_traits
- <node_traits>::type reduced_node_traits;
- typedef typename reduced_node_traits::node_ptr slist_node_ptr;
- typedef typename reduced_node_traits::node slist_node;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef circular_slist_algorithms<node_traits> node_algorithms;
-
- static slist_node_ptr get_bucket_before_begin
- (const slist_node_ptr &bucket_beg, const slist_node_ptr &bucket_end, const node_ptr &p)
- {
- //First find the last node of p's group.
- //This requires checking the first node of the next group or
- //the bucket node.
- node_ptr prev_node = p;
- node_ptr nxt(node_traits::get_next(p));
- while(!(bucket_beg <= nxt && nxt <= bucket_end) &&
- (group_traits::get_next(nxt) == prev_node)){
- prev_node = nxt;
- nxt = node_traits::get_next(nxt);
- }
-
- //If we've reached the bucket node just return it.
- if(bucket_beg <= nxt && nxt <= bucket_end){
- return nxt;
- }
-
- //Otherwise, iterate using group links until the bucket node
- node_ptr first_node_of_group = nxt;
- node_ptr last_node_group = group_traits::get_next(first_node_of_group);
- slist_node_ptr possible_end = node_traits::get_next(last_node_group);
-
- while(!(bucket_beg <= possible_end && possible_end <= bucket_end)){
- first_node_of_group = detail::dcast_bucket_ptr<node>(possible_end);
- last_node_group = group_traits::get_next(first_node_of_group);
- possible_end = node_traits::get_next(last_node_group);
- }
- return possible_end;
- }
-
- static node_ptr get_prev_to_first_in_group(const slist_node_ptr &bucket_node, const node_ptr &first_in_group)
- {
- node_ptr nb = detail::dcast_bucket_ptr<node>(bucket_node);
- node_ptr n;
- while((n = node_traits::get_next(nb)) != first_in_group){
- nb = group_traits::get_next(n); //go to last in group
- }
- return nb;
- }
-
- static void erase_from_group(const slist_node_ptr &end_ptr, const node_ptr &to_erase_ptr, detail::true_)
- {
- node_ptr const nxt_ptr(node_traits::get_next(to_erase_ptr));
- //Check if the next node is in the group (not end node) and reverse linked to
- //'to_erase_ptr'. Erase if that's the case.
- if(nxt_ptr != end_ptr && to_erase_ptr == group_traits::get_next(nxt_ptr)){
- group_algorithms::unlink_after(nxt_ptr);
- }
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static void erase_from_group(const slist_node_ptr&, const node_ptr&, detail::false_)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(const node_ptr &first_in_group, detail::true_)
- { return group_traits::get_next(first_in_group); }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(node_ptr n, detail::false_)
- { return n; }
-
- static node_ptr get_first_in_group(node_ptr n, detail::true_)
- {
- node_ptr ng;
- while(n == node_traits::get_next((ng = group_traits::get_next(n)))){
- n = ng;
- }
- return n;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr next_group_if_first_in_group(node_ptr ptr)
- {
- return node_traits::get_next(group_traits::get_next(ptr));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_first_in_group(const node_ptr &n, detail::false_)
- { return n; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void insert_in_group(const node_ptr &first_in_group, const node_ptr &n, true_)
- { group_algorithms::link_after(first_in_group, n); }
-
- static void insert_in_group(const node_ptr&, const node_ptr&, false_)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr split_group(node_ptr const new_first_in_group)
- {
- node_ptr const first((get_first_in_group)(new_first_in_group, detail::true_()));
- if(first != new_first_in_group){
- node_ptr const last = group_traits::get_next(first);
- group_traits::set_next(first, group_traits::get_next(new_first_in_group));
- group_traits::set_next(new_first_in_group, last);
- }
- return first;
- }
-};
-
-template<class BucketType, class SplitTraits>
-class incremental_rehash_rollback
-{
- private:
- typedef BucketType bucket_type;
- typedef SplitTraits split_traits;
-
- incremental_rehash_rollback();
- incremental_rehash_rollback & operator=(const incremental_rehash_rollback &);
- incremental_rehash_rollback (const incremental_rehash_rollback &);
-
- public:
- incremental_rehash_rollback
- (bucket_type &source_bucket, bucket_type &destiny_bucket, split_traits &split_traits)
- : source_bucket_(source_bucket), destiny_bucket_(destiny_bucket)
- , split_traits_(split_traits), released_(false)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void release()
- { released_ = true; }
-
- ~incremental_rehash_rollback()
- {
- if(!released_){
- //If an exception is thrown, just put all moved nodes back in the old bucket
- //and move back the split mark.
- destiny_bucket_.splice_after(destiny_bucket_.before_begin(), source_bucket_);
- split_traits_.decrement();
- }
- }
-
- private:
- bucket_type &source_bucket_;
- bucket_type &destiny_bucket_;
- split_traits &split_traits_;
- bool released_;
-};
-
-template<class NodeTraits>
-struct node_functions
-{
- BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr p, std::size_t h, true_)
- { return NodeTraits::set_hash(p, h); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr, std::size_t, false_)
- {}
-};
-
-BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::false_)
-{ return hash_value % bucket_cnt; }
-
-BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::true_)
-{ return hash_value & (bucket_cnt - 1); }
-
-template<bool Power2Buckets, bool Incremental>
-BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket_split(std::size_t hash_value, std::size_t bucket_cnt, std::size_t split)
-{
- std::size_t bucket_number = detail::hash_to_bucket(hash_value, bucket_cnt, detail::bool_<Power2Buckets>());
- if(Incremental)
- bucket_number -= static_cast<std::size_t>(bucket_number >= split)*(bucket_cnt/2);
- return bucket_number;
-}
-
-} //namespace detail {
-
-//!This metafunction will obtain the type of a bucket
-//!from the value_traits or hook option to be used with
-//!a hash container.
-template<class ValueTraitsOrHookOption>
-struct unordered_bucket
- : public detail::unordered_bucket_impl
- <typename ValueTraitsOrHookOption::
- template pack<empty>::proto_value_traits
- >
-{};
-
-//!This metafunction will obtain the type of a bucket pointer
-//!from the value_traits or hook option to be used with
-//!a hash container.
-template<class ValueTraitsOrHookOption>
-struct unordered_bucket_ptr
- : public detail::unordered_bucket_ptr_impl
- <typename ValueTraitsOrHookOption::
- template pack<empty>::proto_value_traits
- >
-{};
-
-//!This metafunction will obtain the type of the default bucket traits
-//!(when the user does not specify the bucket_traits<> option) from the
-//!value_traits or hook option to be used with
-//!a hash container.
-template<class ValueTraitsOrHookOption>
-struct unordered_default_bucket_traits
-{
- typedef typename ValueTraitsOrHookOption::
- template pack<empty>::proto_value_traits supposed_value_traits;
- typedef typename detail::
- get_slist_impl_from_supposed_value_traits
- <supposed_value_traits>::type slist_impl;
- typedef detail::bucket_traits_impl
- <slist_impl> implementation_defined;
- typedef implementation_defined type;
-};
-
-struct default_bucket_traits;
-
-//hashtable default hook traits
-struct default_hashtable_hook_applier
-{ template <class T> struct apply{ typedef typename T::default_hashtable_hook type; }; };
-
-template<>
-struct is_default_hook_tag<default_hashtable_hook_applier>
-{ static const bool value = true; };
-
-struct hashtable_defaults
-{
- typedef default_hashtable_hook_applier proto_value_traits;
- typedef std::size_t size_type;
- typedef void key_of_value;
- typedef void equal;
- typedef void hash;
- typedef default_bucket_traits bucket_traits;
- static const bool constant_time_size = true;
- static const bool power_2_buckets = false;
- static const bool cache_begin = false;
- static const bool compare_hash = false;
- static const bool incremental = false;
-};
-
-template<class ValueTraits, bool IsConst>
-struct downcast_node_to_value_t
- : public detail::node_to_value<ValueTraits, IsConst>
-{
- typedef detail::node_to_value<ValueTraits, IsConst> base_t;
- typedef typename base_t::result_type result_type;
- typedef ValueTraits value_traits;
- typedef typename detail::get_slist_impl
- <typename detail::reduced_slist_node_traits
- <typename value_traits::node_traits>::type
- >::type slist_impl;
- typedef typename detail::add_const_if_c
- <typename slist_impl::node, IsConst>::type & first_argument_type;
- typedef typename detail::add_const_if_c
- < typename ValueTraits::node_traits::node
- , IsConst>::type & intermediate_argument_type;
- typedef typename pointer_traits
- <typename ValueTraits::pointer>::
- template rebind_pointer
- <const ValueTraits>::type const_value_traits_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE downcast_node_to_value_t(const const_value_traits_ptr &ptr)
- : base_t(ptr)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE result_type operator()(first_argument_type arg) const
- { return this->base_t::operator()(static_cast<intermediate_argument_type>(arg)); }
-};
-
-template<class F, class SlistNodePtr, class NodePtr>
-struct node_cast_adaptor
- //Use public inheritance to avoid MSVC bugs with closures
- : public detail::ebo_functor_holder<F>
-{
- typedef detail::ebo_functor_holder<F> base_t;
-
- typedef typename pointer_traits<SlistNodePtr>::element_type slist_node;
- typedef typename pointer_traits<NodePtr>::element_type node;
-
- template<class ConvertibleToF, class RealValuTraits>
- BOOST_INTRUSIVE_FORCEINLINE node_cast_adaptor(const ConvertibleToF &c2f, const RealValuTraits *traits)
- : base_t(base_t(c2f, traits))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE typename base_t::node_ptr operator()(const slist_node &to_clone)
- { return base_t::operator()(static_cast<const node &>(to_clone)); }
-
- BOOST_INTRUSIVE_FORCEINLINE void operator()(SlistNodePtr to_clone)
- {
- base_t::operator()(pointer_traits<NodePtr>::pointer_to(static_cast<node &>(*to_clone)));
- }
-};
-
-//bucket_plus_vtraits stores ValueTraits + BucketTraits
-//this data is needed by iterators to obtain the
-//value from the iterator and detect the bucket
-template<class ValueTraits, class BucketTraits>
-struct bucket_plus_vtraits
-{
- typedef BucketTraits bucket_traits;
- typedef ValueTraits value_traits;
-
- static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
-
- typedef typename
- detail::get_slist_impl_from_supposed_value_traits
- <value_traits>::type slist_impl;
- typedef typename value_traits::node_traits node_traits;
- typedef unordered_group_adapter<node_traits> group_traits;
- typedef typename slist_impl::iterator siterator;
- typedef detail::bucket_impl<slist_impl> bucket_type;
- typedef detail::group_functions<node_traits> group_functions_t;
- typedef typename slist_impl::node_algorithms node_algorithms;
- typedef typename slist_impl::node_ptr slist_node_ptr;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::node node;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits
- <const_pointer>::reference const_reference;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef typename pointer_traits
- <typename value_traits::pointer>::
- template rebind_pointer
- <const value_traits>::type const_value_traits_ptr;
- typedef typename pointer_traits
- <typename value_traits::pointer>::
- template rebind_pointer
- <const bucket_plus_vtraits>::type const_bucket_value_traits_ptr;
- typedef typename detail::unordered_bucket_ptr_impl
- <value_traits>::type bucket_ptr;
-
- template<class BucketTraitsType>
- BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
- : data(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits & operator =(const bucket_plus_vtraits &x)
- { data.bucket_traits_ = x.data.bucket_traits_; return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
- { return pointer_traits<const_value_traits_ptr>::pointer_to(this->priv_value_traits()); }
-
- //bucket_value_traits
- //
- BOOST_INTRUSIVE_FORCEINLINE const bucket_plus_vtraits &get_bucket_value_traits() const
- { return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits &get_bucket_value_traits()
- { return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE const_bucket_value_traits_ptr bucket_value_traits_ptr() const
- { return pointer_traits<const_bucket_value_traits_ptr>::pointer_to(this->get_bucket_value_traits()); }
-
- //value traits
- //
- BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
- { return this->data; }
-
- BOOST_INTRUSIVE_FORCEINLINE value_traits &priv_value_traits()
- { return this->data; }
-
- //bucket_traits
- //
- BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
- { return this->data.bucket_traits_; }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_traits &priv_bucket_traits()
- { return this->data.bucket_traits_; }
-
- //bucket operations
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_bucket_pointer() const
- { return this->priv_bucket_traits().bucket_begin(); }
-
- std::size_t priv_bucket_count() const
- { return this->priv_bucket_traits().bucket_count(); }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_invalid_bucket() const
- {
- const bucket_traits &rbt = this->priv_bucket_traits();
- return rbt.bucket_begin() + rbt.bucket_count();
- }
-
- BOOST_INTRUSIVE_FORCEINLINE siterator priv_invalid_local_it() const
- { return this->priv_bucket_traits().bucket_begin()->before_begin(); }
-
- template<class NodeDisposer>
- static std::size_t priv_erase_from_single_bucket(bucket_type &b, siterator sbefore_first, siterator slast, NodeDisposer node_disposer, detail::true_) //optimize multikey
- {
- std::size_t n = 0;
- siterator const sfirst(++siterator(sbefore_first));
- if(sfirst != slast){
- node_ptr const nf = detail::dcast_bucket_ptr<node>(sfirst.pointed_node());
- node_ptr const nl = detail::dcast_bucket_ptr<node>(slast.pointed_node());
- node_ptr const ne = detail::dcast_bucket_ptr<node>(b.end().pointed_node());
-
- if(group_functions_t::next_group_if_first_in_group(nf) != nf) {
- // The node is at the beginning of a group.
- if(nl != ne){
- group_functions_t::split_group(nl);
- }
- }
- else {
- node_ptr const group1 = group_functions_t::split_group(nf);
- if(nl != ne) {
- node_ptr const group2 = group_functions_t::split_group(ne);
- if(nf == group2) { //Both first and last in the same group
- //so join group1 and group2
- node_ptr const end1 = group_traits::get_next(group1);
- node_ptr const end2 = group_traits::get_next(group2);
- group_traits::set_next(group1, end2);
- group_traits::set_next(group2, end1);
- }
- }
- }
-
- siterator it(++siterator(sbefore_first));
- while(it != slast){
- node_disposer((it++).pointed_node());
- ++n;
- }
- b.erase_after(sbefore_first, slast);
- }
- return n;
- }
-
- template<class NodeDisposer>
- static std::size_t priv_erase_from_single_bucket(bucket_type &b, siterator sbefore_first, siterator slast, NodeDisposer node_disposer, detail::false_) //optimize multikey
- {
- std::size_t n = 0;
- siterator it(++siterator(sbefore_first));
- while(it != slast){
- node_disposer((it++).pointed_node());
- ++n;
- }
- b.erase_after(sbefore_first, slast);
- return n;
- }
-
- template<class NodeDisposer>
- static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::true_) //optimize multikey
- {
- node_ptr const ne(detail::dcast_bucket_ptr<node>(b.end().pointed_node()));
- node_ptr n(detail::dcast_bucket_ptr<node>(i.pointed_node()));
- node_ptr pos = node_traits::get_next(group_traits::get_next(n));
- node_ptr bn;
- node_ptr nn(node_traits::get_next(n));
-
- if(pos != n) {
- //Node is the first of the group
- bn = group_functions_t::get_prev_to_first_in_group(ne, n);
-
- //Unlink the rest of the group if it's not the last node of its group
- if(nn != ne && group_traits::get_next(nn) == n){
- group_algorithms::unlink_after(nn);
- }
- }
- else if(nn != ne && group_traits::get_next(nn) == n){
- //Node is not the end of the group
- bn = group_traits::get_next(n);
- group_algorithms::unlink_after(nn);
- }
- else{
- //Node is the end of the group
- bn = group_traits::get_next(n);
- node_ptr const x(group_algorithms::get_previous_node(n));
- group_algorithms::unlink_after(x);
- }
- b.erase_after_and_dispose(bucket_type::s_iterator_to(*bn), node_disposer);
- }
-
- template<class NodeDisposer>
- BOOST_INTRUSIVE_FORCEINLINE static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::false_) //optimize multikey
- { b.erase_after_and_dispose(b.previous(i), node_disposer); }
-
- template<class NodeDisposer, bool OptimizeMultikey>
- std::size_t priv_erase_node_range( siterator const &before_first_it, std::size_t const first_bucket
- , siterator const &last_it, std::size_t const last_bucket
- , NodeDisposer node_disposer, detail::bool_<OptimizeMultikey> optimize_multikey_tag)
- {
- std::size_t num_erased(0);
- siterator last_step_before_it;
- if(first_bucket != last_bucket){
- bucket_type *b = (&this->priv_bucket_pointer()[0]);
- num_erased += this->priv_erase_from_single_bucket
- (b[first_bucket], before_first_it, b[first_bucket].end(), node_disposer, optimize_multikey_tag);
- for(std::size_t i = 0, n = (last_bucket - first_bucket - 1); i != n; ++i){
- num_erased += this->priv_erase_whole_bucket(b[first_bucket+i+1], node_disposer);
- }
- last_step_before_it = b[last_bucket].before_begin();
- }
- else{
- last_step_before_it = before_first_it;
- }
- num_erased += this->priv_erase_from_single_bucket
- (this->priv_bucket_pointer()[last_bucket], last_step_before_it, last_it, node_disposer, optimize_multikey_tag);
- return num_erased;
- }
-
- static siterator priv_get_last(bucket_type &b, detail::true_) //optimize multikey
- {
- //First find the last node of p's group.
- //This requires checking the first node of the next group or
- //the bucket node.
- slist_node_ptr end_ptr(b.end().pointed_node());
- node_ptr possible_end(node_traits::get_next( detail::dcast_bucket_ptr<node>(end_ptr)));
- node_ptr last_node_group(possible_end);
-
- while(end_ptr != possible_end){
- last_node_group = group_traits::get_next(detail::dcast_bucket_ptr<node>(possible_end));
- possible_end = node_traits::get_next(last_node_group);
- }
- return bucket_type::s_iterator_to(*last_node_group);
- }
-
- template<class NodeDisposer>
- std::size_t priv_erase_whole_bucket(bucket_type &b, NodeDisposer node_disposer)
- {
- std::size_t num_erased = 0;
- siterator b_begin(b.before_begin());
- siterator nxt(b_begin);
- ++nxt;
- siterator const end_sit(b.end());
- while(nxt != end_sit){
- //No need to init group links as we'll delete all bucket nodes
- nxt = bucket_type::s_erase_after_and_dispose(b_begin, node_disposer);
- ++num_erased;
- }
- return num_erased;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_last(bucket_type &b, detail::false_) //NOT optimize multikey
- { return b.previous(b.end()); }
-
- static siterator priv_get_previous(bucket_type &b, siterator i, detail::true_) //optimize multikey
- {
- node_ptr const elem(detail::dcast_bucket_ptr<node>(i.pointed_node()));
- node_ptr const prev_in_group(group_traits::get_next(elem));
- bool const first_in_group = node_traits::get_next(prev_in_group) != elem;
- typename bucket_type::node &n = first_in_group
- ? *group_functions_t::get_prev_to_first_in_group(b.end().pointed_node(), elem)
- : *group_traits::get_next(elem)
- ;
- return bucket_type::s_iterator_to(n);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_previous(bucket_type &b, siterator i, detail::false_) //NOT optimize multikey
- { return b.previous(i); }
-
- std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::true_) //optimize multikey
- {
- const bucket_ptr f(this->priv_bucket_pointer()), l(f + this->priv_bucket_count() - 1);
- slist_node_ptr bb = group_functions_t::get_bucket_before_begin
- ( f->end().pointed_node()
- , l->end().pointed_node()
- , detail::dcast_bucket_ptr<node>(it.pointed_node()));
- //Now get the bucket_impl from the iterator
- const bucket_type &b = static_cast<const bucket_type&>
- (bucket_type::slist_type::container_from_end_iterator(bucket_type::s_iterator_to(*bb)));
- //Now just calculate the index b has in the bucket array
- return static_cast<std::size_t>(&b - &*f);
- }
-
- std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::false_) //NO optimize multikey
- {
- bucket_ptr f(this->priv_bucket_pointer()), l(f + this->priv_bucket_count() - 1);
- slist_node_ptr first_ptr(f->cend().pointed_node())
- , last_ptr(l->cend().pointed_node());
-
- //The end node is embedded in the singly linked list:
- //iterate until we reach it.
- while(!(first_ptr <= it.pointed_node() && it.pointed_node() <= last_ptr)){
- ++it;
- }
- //Now get the bucket_impl from the iterator
- const bucket_type &b = static_cast<const bucket_type&>
- (bucket_type::container_from_end_iterator(it));
-
- //Now just calculate the index b has in the bucket array
- return static_cast<std::size_t>(&b - &*f);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_) //store_hash
- { return node_traits::get_hash(detail::dcast_bucket_ptr<node>(n)); }
-
- BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr, detail::false_) //NO store_hash
- { return std::size_t(-1); }
-
- BOOST_INTRUSIVE_FORCEINLINE node &priv_value_to_node(reference v)
- { return *this->priv_value_traits().to_node_ptr(v); }
-
- BOOST_INTRUSIVE_FORCEINLINE const node &priv_value_to_node(const_reference v) const
- { return *this->priv_value_traits().to_node_ptr(v); }
-
- BOOST_INTRUSIVE_FORCEINLINE reference priv_value_from_slist_node(slist_node_ptr n)
- { return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_reference priv_value_from_slist_node(slist_node_ptr n) const
- { return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
-
- void priv_clear_buckets(const bucket_ptr buckets_ptr, const std::size_t bucket_cnt)
- {
- bucket_ptr buckets_it = buckets_ptr;
- for(std::size_t bucket_i = 0; bucket_i != bucket_cnt; ++buckets_it, ++bucket_i){
- if(safemode_or_autounlink){
- buckets_it->clear_and_dispose(detail::init_disposer<node_algorithms>());
- }
- else{
- buckets_it->clear();
- }
- }
- }
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::true_) const //For store_hash == true
- { return node_traits::get_hash(this->priv_value_traits().to_node_ptr(v)); }
-
- typedef hashtable_iterator<bucket_plus_vtraits, false> iterator;
- typedef hashtable_iterator<bucket_plus_vtraits, true> const_iterator;
-
- BOOST_INTRUSIVE_FORCEINLINE iterator end()
- { return iterator(this->priv_invalid_local_it(), 0); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
- { return this->cend(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
- { return const_iterator(this->priv_invalid_local_it(), 0); }
-
- //Public functions:
- struct data_type : public ValueTraits
- {
- template<class BucketTraitsType>
- BOOST_INTRUSIVE_FORCEINLINE data_type(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
- : ValueTraits(val_traits), bucket_traits_(::boost::forward<BucketTraitsType>(b_traits))
- {}
-
- bucket_traits bucket_traits_;
- } data;
-};
-
-template<class Hash, class>
-struct get_hash
-{
- typedef Hash type;
-};
-
-template<class T>
-struct get_hash<void, T>
-{
- typedef ::boost::hash<T> type;
-};
-
-template<class EqualTo, class>
-struct get_equal_to
-{
- typedef EqualTo type;
-};
-
-template<class T>
-struct get_equal_to<void, T>
-{
- typedef std::equal_to<T> type;
-};
-
-template<class KeyOfValue, class T>
-struct get_hash_key_of_value
-{
- typedef KeyOfValue type;
-};
-
-template<class T>
-struct get_hash_key_of_value<void, T>
-{
- typedef ::boost::intrusive::detail::identity<T> type;
-};
-
-template<class T, class VoidOrKeyOfValue>
-struct hash_key_types_base
-{
- typedef typename get_hash_key_of_value
- < VoidOrKeyOfValue, T>::type key_of_value;
- typedef typename key_of_value::type key_type;
-};
-
-template<class T, class VoidOrKeyOfValue, class VoidOrKeyHash>
-struct hash_key_hash
- : get_hash
- < VoidOrKeyHash
- , typename hash_key_types_base<T, VoidOrKeyOfValue>::key_type
- >
-{};
-
-template<class T, class VoidOrKeyOfValue, class VoidOrKeyEqual>
-struct hash_key_equal
- : get_equal_to
- < VoidOrKeyEqual
- , typename hash_key_types_base<T, VoidOrKeyOfValue>::key_type
- >
-
-{};
-
-//bucket_hash_t
-//Stores bucket_plus_vtraits plust the hash function
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class BucketTraits>
-struct bucket_hash_t
- //Use public inheritance to avoid MSVC bugs with closures
- : public detail::ebo_functor_holder
- <typename hash_key_hash < typename bucket_plus_vtraits<ValueTraits,BucketTraits>::value_traits::value_type
- , VoidOrKeyOfValue
- , VoidOrKeyHash
- >::type
- >
- , bucket_plus_vtraits<ValueTraits, BucketTraits> //4
-{
- typedef typename bucket_plus_vtraits<ValueTraits,BucketTraits>::value_traits value_traits;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::node_traits node_traits;
- typedef hash_key_hash
- < value_type, VoidOrKeyOfValue, VoidOrKeyHash> hash_key_hash_t;
- typedef typename hash_key_hash_t::type hasher;
- typedef typename hash_key_types_base<value_type, VoidOrKeyOfValue>::key_of_value key_of_value;
-
- typedef BucketTraits bucket_traits;
- typedef bucket_plus_vtraits<ValueTraits, BucketTraits> bucket_plus_vtraits_t;
- typedef detail::ebo_functor_holder<hasher> base_t;
-
- template<class BucketTraitsType>
- BOOST_INTRUSIVE_FORCEINLINE bucket_hash_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h)
- : detail::ebo_functor_holder<hasher>(h), bucket_plus_vtraits_t(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const hasher &priv_hasher() const
- { return this->base_t::get(); }
-
- hasher &priv_hasher()
- { return this->base_t::get(); }
-
- using bucket_plus_vtraits_t::priv_stored_or_compute_hash; //For store_hash == true
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::false_) const //For store_hash == false
- { return this->priv_hasher()(key_of_value()(v)); }
-};
-
-template<class ValueTraits, class BucketTraits, class VoidOrKeyOfValue, class VoidOrKeyEqual>
-struct hashtable_equal_holder
-{
- typedef detail::ebo_functor_holder
- < typename hash_key_equal < typename bucket_plus_vtraits<ValueTraits, BucketTraits>::value_traits::value_type
- , VoidOrKeyOfValue
- , VoidOrKeyEqual
- >::type
- > type;
-};
-
-
-//bucket_hash_equal_t
-//Stores bucket_hash_t and the equality function when the first
-//non-empty bucket shall not be cached.
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, bool>
-struct bucket_hash_equal_t
- //Use public inheritance to avoid MSVC bugs with closures
- : public bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> //3
- , public hashtable_equal_holder<ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type //equal
-{
- typedef typename hashtable_equal_holder
- <ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type equal_holder_t;
- typedef bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> bucket_hash_type;
- typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
- typedef ValueTraits value_traits;
- typedef typename equal_holder_t::functor_type key_equal;
- typedef typename bucket_hash_type::hasher hasher;
- typedef BucketTraits bucket_traits;
- typedef typename bucket_plus_vtraits_t::slist_impl slist_impl;
- typedef typename slist_impl::iterator siterator;
- typedef detail::bucket_impl<slist_impl> bucket_type;
- typedef typename detail::unordered_bucket_ptr_impl<value_traits>::type bucket_ptr;
-
- template<class BucketTraitsType>
- bucket_hash_equal_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h, const key_equal &e)
- : bucket_hash_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h)
- , equal_holder_t(e)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_get_cache()
- { return this->bucket_hash_type::priv_bucket_pointer(); }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
- { return 0u; }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &)
- {}
-
- siterator priv_begin() const
- {
- std::size_t n = 0;
- std::size_t bucket_cnt = this->bucket_hash_type::priv_bucket_count();
- for (n = 0; n < bucket_cnt; ++n){
- bucket_type &b = this->bucket_hash_type::priv_bucket_pointer()[n];
- if(!b.empty()){
- return b.begin();
- }
- }
- return this->bucket_hash_type::priv_invalid_local_it();
- }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_insertion_update_cache(std::size_t)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache_range(std::size_t, std::size_t)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
- { return this->equal_holder_t::get(); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
- { return this->equal_holder_t::get(); }
-};
-
-//bucket_hash_equal_t
-//Stores bucket_hash_t and the equality function when the first
-//non-empty bucket shall be cached.
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits> //cache_begin == true version
-struct bucket_hash_equal_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, true>
- //Use public inheritance to avoid MSVC bugs with closures
- : bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> //2
- , hashtable_equal_holder<ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type
-{
- typedef typename hashtable_equal_holder
- <ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type equal_holder_t;
-
- typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
- typedef ValueTraits value_traits;
- typedef typename equal_holder_t::functor_type key_equal;
- typedef bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> bucket_hash_type;
- typedef typename bucket_hash_type::hasher hasher;
- typedef BucketTraits bucket_traits;
- typedef typename bucket_plus_vtraits_t::slist_impl::iterator siterator;
-
- template<class BucketTraitsType>
- bucket_hash_equal_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h, const key_equal &e)
- : bucket_hash_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h)
- , equal_holder_t(e)
- {}
-
- typedef typename detail::unordered_bucket_ptr_impl
- <typename bucket_hash_type::value_traits>::type bucket_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr &priv_get_cache()
- { return cached_begin_; }
-
- BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &priv_get_cache() const
- { return cached_begin_; }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &p)
- { cached_begin_ = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
- { return this->cached_begin_ - this->bucket_hash_type::priv_bucket_pointer(); }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
- { this->cached_begin_ = this->bucket_hash_type::priv_invalid_bucket(); }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &other)
- {
- ::boost::adl_move_swap(this->cached_begin_, other.cached_begin_);
- }
-
- siterator priv_begin() const
- {
- if(this->cached_begin_ == this->bucket_hash_type::priv_invalid_bucket()){
- return this->bucket_hash_type::priv_invalid_local_it();
- }
- else{
- return this->cached_begin_->begin();
- }
- }
-
- void priv_insertion_update_cache(std::size_t insertion_bucket)
- {
- bucket_ptr p = this->bucket_hash_type::priv_bucket_pointer() + insertion_bucket;
- if(p < this->cached_begin_){
- this->cached_begin_ = p;
- }
- }
-
- BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
- { return this->equal_holder_t::get(); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
- { return this->equal_holder_t::get(); }
-
- void priv_erasure_update_cache_range(std::size_t first_bucket_num, std::size_t last_bucket_num)
- {
- //If the last bucket is the end, the cache must be updated
- //to the last position if all
- if(this->priv_get_cache_bucket_num() == first_bucket_num &&
- this->bucket_hash_type::priv_bucket_pointer()[first_bucket_num].empty() ){
- this->priv_set_cache(this->bucket_hash_type::priv_bucket_pointer() + last_bucket_num);
- this->priv_erasure_update_cache();
- }
- }
-
- void priv_erasure_update_cache()
- {
- if(this->cached_begin_ != this->bucket_hash_type::priv_invalid_bucket()){
- std::size_t current_n = this->priv_get_cache() - this->bucket_hash_type::priv_bucket_pointer();
- for( const std::size_t num_buckets = this->bucket_hash_type::priv_bucket_count()
- ; current_n < num_buckets
- ; ++current_n, ++this->priv_get_cache()){
- if(!this->priv_get_cache()->empty()){
- return;
- }
- }
- this->priv_initialize_cache();
- }
- }
-
- bucket_ptr cached_begin_;
-};
-
-//This wrapper around size_traits is used
-//to maintain minimal container size with compilers like MSVC
-//that have problems with EBO and multiple empty base classes
-template<class DeriveFrom, class SizeType, bool>
-struct hashtable_size_traits_wrapper
- : public DeriveFrom
-{
- template<class Base, class Arg0, class Arg1, class Arg2>
- hashtable_size_traits_wrapper( BOOST_FWD_REF(Base) base, BOOST_FWD_REF(Arg0) arg0
- , BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
- : DeriveFrom(::boost::forward<Base>(base)
- , ::boost::forward<Arg0>(arg0)
- , ::boost::forward<Arg1>(arg1)
- , ::boost::forward<Arg2>(arg2))
- {}
- typedef detail::size_holder < true, SizeType> size_traits;//size_traits
-
- size_traits size_traits_;
-
- typedef const size_traits & size_traits_const_t;
- typedef size_traits & size_traits_t;
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits_const_t priv_size_traits() const
- { return size_traits_; }
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits_t priv_size_traits()
- { return size_traits_; }
-};
-
-template<class DeriveFrom, class SizeType>
-struct hashtable_size_traits_wrapper<DeriveFrom, SizeType, false>
- : public DeriveFrom
-{
- template<class Base, class Arg0, class Arg1, class Arg2>
- hashtable_size_traits_wrapper( BOOST_FWD_REF(Base) base, BOOST_FWD_REF(Arg0) arg0
- , BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
- : DeriveFrom(::boost::forward<Base>(base)
- , ::boost::forward<Arg0>(arg0)
- , ::boost::forward<Arg1>(arg1)
- , ::boost::forward<Arg2>(arg2))
- {}
-
- typedef detail::size_holder< false, SizeType> size_traits;
-
- typedef size_traits size_traits_const_t;
- typedef size_traits size_traits_t;
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits priv_size_traits() const
- { return size_traits(); }
-};
-
-//hashdata_internal
-//Stores bucket_hash_equal_t and split_traits
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, class SizeType, std::size_t BoolFlags>
-struct hashdata_internal
- : public hashtable_size_traits_wrapper
- < bucket_hash_equal_t
- < ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits
- , 0 != (BoolFlags & hash_bool_flags::cache_begin_pos)
- > //2
- , SizeType
- , (BoolFlags & hash_bool_flags::incremental_pos) != 0
- >
-{
- typedef hashtable_size_traits_wrapper
- < bucket_hash_equal_t
- < ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits
- , 0 != (BoolFlags & hash_bool_flags::cache_begin_pos)
- > //2
- , SizeType
- , (BoolFlags & hash_bool_flags::incremental_pos) != 0
- > internal_type;
- typedef typename internal_type::key_equal key_equal;
- typedef typename internal_type::hasher hasher;
- typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
- typedef SizeType size_type;
- typedef typename internal_type::size_traits split_traits;
- typedef typename bucket_plus_vtraits_t::bucket_ptr bucket_ptr;
- typedef typename bucket_plus_vtraits_t::const_value_traits_ptr const_value_traits_ptr;
- typedef typename bucket_plus_vtraits_t::siterator siterator;
- typedef typename bucket_plus_vtraits_t::bucket_traits bucket_traits;
- typedef typename bucket_plus_vtraits_t::value_traits value_traits;
- typedef typename bucket_plus_vtraits_t::bucket_type bucket_type;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits
- <const_pointer>::reference const_reference;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef detail::node_functions<node_traits> node_functions_t;
- typedef typename detail::get_slist_impl
- <typename detail::reduced_slist_node_traits
- <typename value_traits::node_traits>::type
- >::type slist_impl;
- typedef typename slist_impl::node_algorithms node_algorithms;
- typedef typename slist_impl::node_ptr slist_node_ptr;
-
- typedef hash_key_types_base
- < typename ValueTraits::value_type
- , VoidOrKeyOfValue
- > hash_types_base;
- typedef typename hash_types_base::key_of_value key_of_value;
-
- static const bool store_hash = detail::store_hash_is_true<node_traits>::value;
- static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
- static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
-
- typedef detail::bool_<store_hash> store_hash_t;
-
- typedef detail::transform_iterator
- < typename slist_impl::iterator
- , downcast_node_to_value_t
- < value_traits
- , false> > local_iterator;
-
- typedef detail::transform_iterator
- < typename slist_impl::iterator
- , downcast_node_to_value_t
- < value_traits
- , true> > const_local_iterator;
- //
-
- template<class BucketTraitsType>
- hashdata_internal( const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits
- , const hasher & h, const key_equal &e)
- : internal_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h, e)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_t priv_split_traits()
- { return this->priv_size_traits(); }
-
- BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_const_t priv_split_traits() const
- { return this->priv_size_traits(); }
-
- ~hashdata_internal()
- { this->priv_clear_buckets(); }
-
- void priv_clear_buckets()
- {
- this->internal_type::priv_clear_buckets
- ( this->priv_get_cache()
- , this->internal_type::priv_bucket_count()
- - (this->priv_get_cache()
- - this->internal_type::priv_bucket_pointer()));
- }
-
- void priv_clear_buckets_and_cache()
- {
- this->priv_clear_buckets();
- this->priv_initialize_cache();
- }
-
- void priv_initialize_buckets_and_cache()
- {
- this->internal_type::priv_clear_buckets
- ( this->internal_type::priv_bucket_pointer()
- , this->internal_type::priv_bucket_count());
- this->priv_initialize_cache();
- }
-
- typedef hashtable_iterator<bucket_plus_vtraits_t, false> iterator;
- typedef hashtable_iterator<bucket_plus_vtraits_t, true> const_iterator;
-
- static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_ true_value)
- { return bucket_plus_vtraits<ValueTraits, BucketTraits>::priv_stored_hash(n, true_value); }
-
- static std::size_t priv_stored_hash(slist_node_ptr n, detail::false_ false_value)
- { return bucket_plus_vtraits<ValueTraits, BucketTraits>::priv_stored_hash(n, false_value); }
-
- //public functions
- BOOST_INTRUSIVE_FORCEINLINE SizeType split_count() const
- {
- return this->priv_split_traits().get_size();
- }
-
- BOOST_INTRUSIVE_FORCEINLINE iterator iterator_to(reference value)
- {
- return iterator(bucket_type::s_iterator_to
- (this->priv_value_to_node(value)), &this->get_bucket_value_traits());
- }
-
- const_iterator iterator_to(const_reference value) const
- {
- siterator const sit = bucket_type::s_iterator_to
- ( *pointer_traits<node_ptr>::const_cast_from
- (pointer_traits<const_node_ptr>::pointer_to(this->priv_value_to_node(value)))
- );
- return const_iterator(sit, &this->get_bucket_value_traits());
- }
-
- static local_iterator s_local_iterator_to(reference value)
- {
- BOOST_STATIC_ASSERT((!stateful_value_traits));
- siterator sit = bucket_type::s_iterator_to(*value_traits::to_node_ptr(value));
- return local_iterator(sit, const_value_traits_ptr());
- }
-
- static const_local_iterator s_local_iterator_to(const_reference value)
- {
- BOOST_STATIC_ASSERT((!stateful_value_traits));
- siterator const sit = bucket_type::s_iterator_to
- ( *pointer_traits<node_ptr>::const_cast_from
- (value_traits::to_node_ptr(value))
- );
- return const_local_iterator(sit, const_value_traits_ptr());
- }
-
- local_iterator local_iterator_to(reference value)
- {
- siterator sit = bucket_type::s_iterator_to(this->priv_value_to_node(value));
- return local_iterator(sit, this->priv_value_traits_ptr());
- }
-
- const_local_iterator local_iterator_to(const_reference value) const
- {
- siterator sit = bucket_type::s_iterator_to
- ( *pointer_traits<node_ptr>::const_cast_from
- (pointer_traits<const_node_ptr>::pointer_to(this->priv_value_to_node(value)))
- );
- return const_local_iterator(sit, this->priv_value_traits_ptr());
- }
-
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
- {
- const std::size_t bc = this->priv_bucket_count();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(sizeof(size_type) >= sizeof(std::size_t) || bc <= size_type(-1));
- return static_cast<size_type>(bc);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket_size(size_type n) const
- { return this->priv_bucket_pointer()[n].size(); }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr bucket_pointer() const
- { return this->priv_bucket_pointer(); }
-
- BOOST_INTRUSIVE_FORCEINLINE local_iterator begin(size_type n)
- { return local_iterator(this->priv_bucket_pointer()[n].begin(), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_local_iterator begin(size_type n) const
- { return this->cbegin(n); }
-
- static BOOST_INTRUSIVE_FORCEINLINE size_type suggested_upper_bucket_count(size_type n)
- {
- return prime_list_holder<0>::suggested_upper_bucket_count(n);
- }
-
- static BOOST_INTRUSIVE_FORCEINLINE size_type suggested_lower_bucket_count(size_type n)
- {
- return prime_list_holder<0>::suggested_lower_bucket_count(n);
- }
-
- const_local_iterator cbegin(size_type n) const
- {
- return const_local_iterator
- ( pointer_traits<bucket_ptr>::const_cast_from(this->priv_bucket_pointer())[n].begin()
- , this->priv_value_traits_ptr());
- }
-
- using internal_type::end;
- using internal_type::cend;
-
- local_iterator end(size_type n)
- { return local_iterator(this->priv_bucket_pointer()[n].end(), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_local_iterator end(size_type n) const
- { return this->cend(n); }
-
- const_local_iterator cend(size_type n) const
- {
- return const_local_iterator
- ( pointer_traits<bucket_ptr>::const_cast_from(this->priv_bucket_pointer())[n].end()
- , this->priv_value_traits_ptr());
- }
-
- //Public functions for hashtable_impl
-
- BOOST_INTRUSIVE_FORCEINLINE iterator begin()
- { return iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
- { return this->cbegin(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator cbegin() const
- { return const_iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
-
- BOOST_INTRUSIVE_FORCEINLINE hasher hash_function() const
- { return this->priv_hasher(); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_equal key_eq() const
- { return this->priv_equal(); }
-};
-
-/// @endcond
-
-//! The class template hashtable is an intrusive hash table container, that
-//! is used to construct intrusive unordered_set and unordered_multiset containers. The
-//! no-throw guarantee holds only, if the VoidOrKeyEqual object and Hasher don't throw.
-//!
-//! hashtable is a semi-intrusive container: each object to be stored in the
-//! container must contain a proper hook, but the container also needs
-//! additional auxiliary memory to work: hashtable needs a pointer to an array
-//! of type `bucket_type` to be passed in the constructor. This bucket array must
-//! have at least the same lifetime as the container. This makes the use of
-//! hashtable more complicated than purely intrusive containers.
-//! `bucket_type` is default-constructible, copyable and assignable
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
-//! \c bucket_traits<>, power_2_buckets<>, cache_begin<> and incremental<>.
-//!
-//! hashtable only provides forward iterators but it provides 4 iterator types:
-//! iterator and const_iterator to navigate through the whole container and
-//! local_iterator and const_local_iterator to navigate through the values
-//! stored in a single bucket. Local iterators are faster and smaller.
-//!
-//! It's not recommended to use non constant-time size hashtables because several
-//! key functions, like "empty()", become non-constant time functions. Non
-//! constant_time size hashtables are mainly provided to support auto-unlink hooks.
-//!
-//! hashtables, does not make automatic rehashings nor
-//! offers functions related to a load factor. Rehashing can be explicitly requested
-//! and the user must provide a new bucket array that will be used from that moment.
-//!
-//! Since no automatic rehashing is done, iterators are never invalidated when
-//! inserting or erasing elements. Iterators are only invalidated when rehashing.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, class SizeType, std::size_t BoolFlags>
-#endif
-class hashtable_impl
- : private hashtable_size_traits_wrapper
- < hashdata_internal
- < ValueTraits
- , VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits, SizeType
- , BoolFlags & (hash_bool_flags::incremental_pos | hash_bool_flags::cache_begin_pos) //1
- >
- , SizeType
- , (BoolFlags & hash_bool_flags::constant_time_size_pos) != 0
- >
-{
- typedef hashtable_size_traits_wrapper
- < hashdata_internal
- < ValueTraits
- , VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits, SizeType
- , BoolFlags & (hash_bool_flags::incremental_pos | hash_bool_flags::cache_begin_pos) //1
- >
- , SizeType
- , (BoolFlags & hash_bool_flags::constant_time_size_pos) != 0
- > internal_type;
- typedef typename internal_type::size_traits size_traits;
- typedef hash_key_types_base
- < typename ValueTraits::value_type
- , VoidOrKeyOfValue
- > hash_types_base;
- public:
- typedef ValueTraits value_traits;
-
- /// @cond
- typedef BucketTraits bucket_traits;
-
- typedef typename internal_type::slist_impl slist_impl;
- typedef bucket_plus_vtraits<ValueTraits, BucketTraits> bucket_plus_vtraits_t;
- typedef typename bucket_plus_vtraits_t::const_value_traits_ptr const_value_traits_ptr;
-
- using internal_type::begin;
- using internal_type::cbegin;
- using internal_type::end;
- using internal_type::cend;
- using internal_type::hash_function;
- using internal_type::key_eq;
- using internal_type::bucket_size;
- using internal_type::bucket_count;
- using internal_type::local_iterator_to;
- using internal_type::s_local_iterator_to;
- using internal_type::iterator_to;
- using internal_type::bucket_pointer;
- using internal_type::suggested_upper_bucket_count;
- using internal_type::suggested_lower_bucket_count;
- using internal_type::split_count;
-
- /// @endcond
-
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename value_traits::value_type value_type;
- typedef typename hash_types_base::key_type key_type;
- typedef typename hash_types_base::key_of_value key_of_value;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits<const_pointer>::reference const_reference;
- typedef typename pointer_traits<pointer>::difference_type difference_type;
- typedef SizeType size_type;
- typedef typename internal_type::key_equal key_equal;
- typedef typename internal_type::hasher hasher;
- typedef detail::bucket_impl<slist_impl> bucket_type;
- typedef typename internal_type::bucket_ptr bucket_ptr;
- typedef typename slist_impl::iterator siterator;
- typedef typename slist_impl::const_iterator const_siterator;
- typedef typename internal_type::iterator iterator;
- typedef typename internal_type::const_iterator const_iterator;
- typedef typename internal_type::local_iterator local_iterator;
- typedef typename internal_type::const_local_iterator const_local_iterator;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef typename pointer_traits
- <pointer>::template rebind_pointer
- < node >::type node_ptr;
- typedef typename pointer_traits
- <pointer>::template rebind_pointer
- < const node >::type const_node_ptr;
- typedef typename pointer_traits
- <node_ptr>::reference node_reference;
- typedef typename pointer_traits
- <const_node_ptr>::reference const_node_reference;
- typedef typename slist_impl::node_algorithms node_algorithms;
-
- static const bool stateful_value_traits = internal_type::stateful_value_traits;
- static const bool store_hash = internal_type::store_hash;
-
- static const bool unique_keys = 0 != (BoolFlags & hash_bool_flags::unique_keys_pos);
- static const bool constant_time_size = 0 != (BoolFlags & hash_bool_flags::constant_time_size_pos);
- static const bool cache_begin = 0 != (BoolFlags & hash_bool_flags::cache_begin_pos);
- static const bool compare_hash = 0 != (BoolFlags & hash_bool_flags::compare_hash_pos);
- static const bool incremental = 0 != (BoolFlags & hash_bool_flags::incremental_pos);
- static const bool power_2_buckets = incremental || (0 != (BoolFlags & hash_bool_flags::power_2_buckets_pos));
-
- static const bool optimize_multikey
- = detail::optimize_multikey_is_true<node_traits>::value && !unique_keys;
-
- /// @cond
- static const bool is_multikey = !unique_keys;
- private:
-
- //Configuration error: compare_hash<> can't be specified without store_hash<>
- //See documentation for more explanations
- BOOST_STATIC_ASSERT((!compare_hash || store_hash));
-
- typedef typename slist_impl::node_ptr slist_node_ptr;
- typedef typename pointer_traits
- <slist_node_ptr>::template rebind_pointer
- < void >::type void_pointer;
- //We'll define group traits, but these won't be instantiated if
- //optimize_multikey is not true
- typedef unordered_group_adapter<node_traits> group_traits;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef typename internal_type::store_hash_t store_hash_t;
- typedef detail::bool_<optimize_multikey> optimize_multikey_t;
- typedef detail::bool_<cache_begin> cache_begin_t;
- typedef detail::bool_<power_2_buckets> power_2_buckets_t;
- typedef typename internal_type::split_traits split_traits;
- typedef detail::group_functions<node_traits> group_functions_t;
- typedef detail::node_functions<node_traits> node_functions_t;
-
- private:
- //noncopyable, movable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(hashtable_impl)
-
- static const bool safemode_or_autounlink = internal_type::safemode_or_autounlink;
-
- //Constant-time size is incompatible with auto-unlink hooks!
- BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
- //Cache begin is incompatible with auto-unlink hooks!
- BOOST_STATIC_ASSERT(!(cache_begin && ((int)value_traits::link_mode == (int)auto_unlink)));
-
- template<class Disposer>
- struct typeof_node_disposer
- {
- typedef node_cast_adaptor
- < detail::node_disposer< Disposer, value_traits, CircularSListAlgorithms>
- , slist_node_ptr, node_ptr > type;
- };
-
- template<class Disposer>
- typename typeof_node_disposer<Disposer>::type
- make_node_disposer(const Disposer &disposer) const
- {
- typedef typename typeof_node_disposer<Disposer>::type return_t;
- return return_t(disposer, &this->priv_value_traits());
- }
-
- /// @endcond
-
- public:
- typedef detail::insert_commit_data_impl insert_commit_data;
-
-
- public:
-
- //! <b>Requires</b>: buckets must not be being used by any other resource.
- //!
- //! <b>Effects</b>: Constructs an empty unordered_set, storing a reference
- //! to the bucket array and copies of the key_hasher and equal_func functors.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor or invocation of hash_func or equal_func throws.
- //!
- //! <b>Notes</b>: buckets array must be disposed only after
- //! *this is disposed.
- explicit hashtable_impl ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : internal_type(v_traits, b_traits, hash_func, equal_func)
- {
- this->priv_initialize_buckets_and_cache();
- this->priv_size_traits().set_size(size_type(0));
- size_type bucket_sz = this->bucket_count();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_sz != 0);
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (bucket_sz & (bucket_sz-1))));
- this->priv_split_traits().set_size(bucket_sz>>1);
- }
-
- //! <b>Requires</b>: buckets must not be being used by any other resource
- //! and dereferencing iterator must yield an lvalue of type value_type.
- //!
- //! <b>Effects</b>: Constructs an empty container and inserts elements from
- //! [b, e).
- //!
- //! <b>Complexity</b>: If N is distance(b, e): Average case is O(N)
- //! (with a good hash function and with buckets_len >= N),worst case O(N^2).
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor or invocation of hasher or key_equal throws.
- //!
- //! <b>Notes</b>: buckets array must be disposed only after
- //! *this is disposed.
- template<class Iterator>
- hashtable_impl ( bool unique, Iterator b, Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : internal_type(v_traits, b_traits, hash_func, equal_func)
- {
- this->priv_initialize_buckets_and_cache();
- this->priv_size_traits().set_size(size_type(0));
- size_type bucket_sz = this->bucket_count();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_sz != 0);
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (bucket_sz & (bucket_sz-1))));
- this->priv_split_traits().set_size(bucket_sz>>1);
- //Now insert
- if(unique)
- this->insert_unique(b, e);
- else
- this->insert_equal(b, e);
- }
-
- //! <b>Effects</b>: Constructs a container moving resources from another container.
- //! Internal value traits, bucket traits, hasher and comparison are move constructed and
- //! nodes belonging to x are linked to *this.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node's
- //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the move constructor of value traits, bucket traits, hasher or comparison throws.
- hashtable_impl(BOOST_RV_REF(hashtable_impl) x)
- : internal_type( ::boost::move(x.priv_value_traits())
- , ::boost::move(x.priv_bucket_traits())
- , ::boost::move(x.priv_hasher())
- , ::boost::move(x.priv_equal())
- )
- {
- this->priv_swap_cache(x);
- x.priv_initialize_cache();
- this->priv_size_traits().set_size(x.priv_size_traits().get_size());
- x.priv_size_traits().set_size(size_type(0));
- this->priv_split_traits().set_size(x.priv_split_traits().get_size());
- x.priv_split_traits().set_size(size_type(0));
- }
-
- //! <b>Effects</b>: Equivalent to swap.
- //!
- hashtable_impl& operator=(BOOST_RV_REF(hashtable_impl) x)
- { this->swap(x); return *this; }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_set
- //! are not deleted (i.e. no destructors are called).
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the unordered_set, if
- //! it's a safe-mode or auto-unlink value. Otherwise constant.
- //!
- //! <b>Throws</b>: Nothing.
- ~hashtable_impl();
-
- //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
- //!
- //! <b>Throws</b>: Nothing.
- iterator begin();
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
- //! of the unordered_set.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator begin() const;
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
- //! of the unordered_set.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator cbegin() const;
-
- //! <b>Effects</b>: Returns an iterator pointing to the end of the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator end();
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the end of the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator end() const;
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the end of the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator cend() const;
-
- //! <b>Effects</b>: Returns the hasher object used by the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If hasher copy-constructor throws.
- hasher hash_function() const;
-
- //! <b>Effects</b>: Returns the key_equal object used by the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If key_equal copy-constructor throws.
- key_equal key_eq() const;
-
- #endif
-
- //! <b>Effects</b>: Returns true if the container is empty.
- //!
- //! <b>Complexity</b>: if constant-time size and cache_begin options are disabled,
- //! average constant time (worst case, with empty() == true: O(this->bucket_count()).
- //! Otherwise constant.
- //!
- //! <b>Throws</b>: Nothing.
- bool empty() const
- {
- if(constant_time_size){
- return !this->size();
- }
- else if(cache_begin){
- return this->begin() == this->end();
- }
- else{
- size_type bucket_cnt = this->bucket_count();
- const bucket_type *b = boost::movelib::to_raw_pointer(this->priv_bucket_pointer());
- for (size_type n = 0; n < bucket_cnt; ++n, ++b){
- if(!b->empty()){
- return false;
- }
- }
- return true;
- }
- }
-
- //! <b>Effects</b>: Returns the number of elements stored in the unordered_set.
- //!
- //! <b>Complexity</b>: Linear to elements contained in *this if
- //! constant_time_size is false. Constant-time otherwise.
- //!
- //! <b>Throws</b>: Nothing.
- size_type size() const
- {
- if(constant_time_size)
- return this->priv_size_traits().get_size();
- else{
- size_type len = 0;
- size_type bucket_cnt = this->bucket_count();
- const bucket_type *b = boost::movelib::to_raw_pointer(this->priv_bucket_pointer());
- for (size_type n = 0; n < bucket_cnt; ++n, ++b){
- len += b->size();
- }
- return len;
- }
- }
-
- //! <b>Requires</b>: the hasher and the equality function unqualified swap
- //! call should not throw.
- //!
- //! <b>Effects</b>: Swaps the contents of two unordered_sets.
- //! Swaps also the contained bucket array and equality and hasher functors.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the swap() call for the comparison or hash functors
- //! found using ADL throw. Basic guarantee.
- void swap(hashtable_impl& other)
- {
- //These can throw
- ::boost::adl_move_swap(this->priv_equal(), other.priv_equal());
- ::boost::adl_move_swap(this->priv_hasher(), other.priv_hasher());
- //These can't throw
- ::boost::adl_move_swap(this->priv_bucket_traits(), other.priv_bucket_traits());
- ::boost::adl_move_swap(this->priv_value_traits(), other.priv_value_traits());
- this->priv_swap_cache(other);
- this->priv_size_traits().swap(other.priv_size_traits());
- this->priv_split_traits().swap(other.priv_split_traits());
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
- //! Cloner should yield to nodes that compare equal and produce the same
- //! hash than the original node.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(const_reference )
- //! and inserts them on *this. The hash function and the equality
- //! predicate are copied from the source.
- //!
- //! If store_hash option is true, this method does not use the hash function.
- //!
- //! If any operation throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
- //! throws. Basic guarantee.
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable_impl &src, Cloner cloner, Disposer disposer)
- { this->priv_clone_from(src, cloner, disposer); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
- //! Cloner should yield to nodes that compare equal and produce the same
- //! hash than the original node.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(reference)
- //! and inserts them on *this. The hash function and the equality
- //! predicate are copied from the source.
- //!
- //! If store_hash option is true, this method does not use the hash function.
- //!
- //! If any operation throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
- //! throws. Basic guarantee.
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable_impl) src, Cloner cloner, Disposer disposer)
- { this->priv_clone_from(static_cast<hashtable_impl&>(src), cloner, disposer); }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts the value into the unordered_set.
- //!
- //! <b>Returns</b>: An iterator to the inserted value.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_equal(reference value)
- {
- size_type bucket_num;
- std::size_t hash_value;
- siterator prev;
- siterator const it = this->priv_find
- (key_of_value()(value), this->priv_hasher(), this->priv_equal(), bucket_num, hash_value, prev);
- bool const next_is_in_group = optimize_multikey && it != this->priv_invalid_local_it();
- return this->priv_insert_equal_after_find(value, bucket_num, hash_value, prev, next_is_in_group);
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Equivalent to this->insert_equal(t) for each element in [b, e).
- //!
- //! <b>Complexity</b>: Average case O(N), where N is distance(b, e).
- //! Worst case O(N*this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Basic guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- template<class Iterator>
- void insert_equal(Iterator b, Iterator e)
- {
- for (; b != e; ++b)
- this->insert_equal(*b);
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Tries to inserts value into the unordered_set.
- //!
- //! <b>Returns</b>: If the value
- //! is not already present inserts it and returns a pair containing the
- //! iterator to the new value and true. If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- std::pair<iterator, bool> insert_unique(reference value)
- {
- insert_commit_data commit_data;
- std::pair<iterator, bool> ret = this->insert_unique_check(key_of_value()(value), commit_data);
- if(ret.second){
- ret.first = this->insert_unique_commit(value, commit_data);
- }
- return ret;
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Equivalent to this->insert_unique(t) for each element in [b, e).
- //!
- //! <b>Complexity</b>: Average case O(N), where N is distance(b, e).
- //! Worst case O(N*this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Basic guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- template<class Iterator>
- void insert_unique(Iterator b, Iterator e)
- {
- for (; b != e; ++b)
- this->insert_unique(*b);
- }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the unordered_set, using
- //! a user provided key instead of the value itself.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the hash or the equality is much cheaper to
- //! construct than the value_type and this function offers the possibility to
- //! use that the part to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time.
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the unordered_set.
- //!
- //! After a successful rehashing insert_commit_data remains valid.
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator, bool> insert_unique_check
- ( const KeyType &key
- , KeyHasher hash_func
- , KeyEqual equal_func
- , insert_commit_data &commit_data)
- {
- size_type bucket_num;
- siterator prev;
- siterator const pos = this->priv_find(key, hash_func, equal_func, bucket_num, commit_data.hash, prev);
- return std::pair<iterator, bool>
- ( iterator(pos, &this->get_bucket_value_traits())
- , pos == this->priv_invalid_local_it());
- }
-
- //! <b>Effects</b>: Checks if a value can be inserted in the unordered_set, using
- //! a user provided key instead of the value itself.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hasher or key_compare throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the hash or the equality is much cheaper to
- //! construct than the value_type and this function offers the possibility to
- //! use that the part to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time.
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the unordered_set.
- //!
- //! After a successful rehashing insert_commit_data remains valid.
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
- ( const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(key, this->priv_hasher(), this->priv_equal(), commit_data); }
-
- //! <b>Requires</b>: value must be an lvalue of type value_type. commit_data
- //! must have been obtained from a previous call to "insert_check".
- //! No objects should have been inserted or erased from the unordered_set between
- //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
- //!
- //! <b>Effects</b>: Inserts the value in the unordered_set using the information obtained
- //! from the "commit_data" that a previous "insert_check" filled.
- //!
- //! <b>Returns</b>: An iterator to the newly inserted object.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Notes</b>: This function has only sense if a "insert_check" has been
- //! previously executed to fill "commit_data". No value should be inserted or
- //! erased between the "insert_check" and "insert_commit" calls.
- //!
- //! After a successful rehashing insert_commit_data remains valid.
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
- {
- size_type bucket_num = this->priv_hash_to_bucket(commit_data.hash);
- bucket_type &b = this->priv_bucket_pointer()[bucket_num];
- this->priv_size_traits().increment();
- node_ptr const n = pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
- node_functions_t::store_hash(n, commit_data.hash, store_hash_t());
- this->priv_insertion_update_cache(bucket_num);
- group_functions_t::insert_in_group(n, n, optimize_multikey_t());
- return iterator(b.insert_after(b.before_begin(), *n), &this->get_bucket_value_traits());
- }
-
- //! <b>Effects</b>: Erases the element pointed to by i.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased element. No destructors are called.
- BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator i)
- { this->erase_and_dispose(i, detail::null_disposer()); }
-
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //!
- //! <b>Complexity</b>: Average case O(distance(b, e)),
- //! worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator b, const_iterator e)
- { this->erase_and_dispose(b, e, detail::null_disposer()); }
-
- //! <b>Effects</b>: Erases all the elements with the given value.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- //! Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- BOOST_INTRUSIVE_FORCEINLINE size_type erase(const key_type &key)
- { return this->erase(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Erases all the elements that have the same hash and
- //! compare equal with the given key.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw. Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class KeyType, class KeyHasher, class KeyEqual>
- BOOST_INTRUSIVE_FORCEINLINE size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
- { return this->erase_and_dispose(key, hash_func, equal_func, detail::null_disposer()); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the element pointed to by i.
- //! Disposer::operator()(pointer) is called for the removed element.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- BOOST_INTRUSIVE_DOC1ST(void
- , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
- erase_and_dispose(const_iterator i, Disposer disposer)
- {
- //Get the bucket number and local iterator for both iterators
- siterator const first_local_it(i.slist_it());
- size_type const first_bucket_num = this->priv_get_bucket_num(first_local_it);
- this->priv_erase_node(this->priv_bucket_pointer()[first_bucket_num], first_local_it, make_node_disposer(disposer), optimize_multikey_t());
- this->priv_size_traits().decrement();
- this->priv_erasure_update_cache_range(first_bucket_num, first_bucket_num);
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Complexity</b>: Average case O(distance(b, e)),
- //! worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
- {
- if(b != e){
- //Get the bucket number and local iterator for both iterators
- siterator first_local_it(b.slist_it());
- size_type first_bucket_num = this->priv_get_bucket_num(first_local_it);
-
- const bucket_ptr buck_ptr = this->priv_bucket_pointer();
- siterator before_first_local_it
- = this->priv_get_previous(buck_ptr[first_bucket_num], first_local_it);
- size_type last_bucket_num;
- siterator last_local_it;
-
- //For the end iterator, we will assign the end iterator
- //of the last bucket
- if(e == this->end()){
- last_bucket_num = this->bucket_count() - 1;
- last_local_it = buck_ptr[last_bucket_num].end();
- }
- else{
- last_local_it = e.slist_it();
- last_bucket_num = this->priv_get_bucket_num(last_local_it);
- }
- size_type const num_erased = this->priv_erase_node_range
- ( before_first_local_it, first_bucket_num, last_local_it, last_bucket_num
- , make_node_disposer(disposer), optimize_multikey_t());
- this->priv_size_traits().set_size(this->priv_size_traits().get_size()-num_erased);
- this->priv_erasure_update_cache_range(first_bucket_num, last_bucket_num);
- }
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements with the given value.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- //! Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE size_type erase_and_dispose(const key_type &key, Disposer disposer)
- { return this->erase_and_dispose(key, this->priv_hasher(), this->priv_equal(), disposer); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements with the given key.
- //! according to the comparison functor "equal_func".
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw. Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func
- ,KeyEqual equal_func, Disposer disposer)
- {
- size_type bucket_num;
- std::size_t h;
- siterator prev;
- siterator it = this->priv_find(key, hash_func, equal_func, bucket_num, h, prev);
- bool const success = it != this->priv_invalid_local_it();
-
- size_type cnt(0);
- if(success){
- if(optimize_multikey){
- cnt = this->priv_erase_from_single_bucket
- (this->priv_bucket_pointer()[bucket_num], prev, ++(priv_last_in_group)(it), make_node_disposer(disposer), optimize_multikey_t());
- }
- else{
- bucket_type &b = this->priv_bucket_pointer()[bucket_num];
- siterator const end_sit = b.end();
- do{
- ++cnt;
- ++it;
- }while(it != end_sit &&
- this->priv_is_value_equal_to_key
- (this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func));
- bucket_type::s_erase_after_and_dispose(prev, it, make_node_disposer(disposer));
- }
- this->priv_size_traits().set_size(this->priv_size_traits().get_size()-cnt);
- this->priv_erasure_update_cache();
- }
-
- return cnt;
- }
-
- //! <b>Effects</b>: Erases all of the elements.
- //!
- //! <b>Complexity</b>: Linear to the number of elements on the container.
- //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- void clear()
- {
- this->priv_clear_buckets_and_cache();
- this->priv_size_traits().set_size(size_type(0));
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all of the elements.
- //!
- //! <b>Complexity</b>: Linear to the number of elements on the container.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class Disposer>
- void clear_and_dispose(Disposer disposer)
- {
- if(!constant_time_size || !this->empty()){
- size_type num_buckets = this->bucket_count();
- bucket_ptr b = this->priv_bucket_pointer();
- typename typeof_node_disposer<Disposer>::type d(disposer, &this->priv_value_traits());
- for(; num_buckets--; ++b){
- b->clear_and_dispose(d);
- }
- this->priv_size_traits().set_size(size_type(0));
- }
- this->priv_initialize_cache();
- }
-
- //! <b>Effects</b>: Returns the number of contained elements with the given value
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE size_type count(const key_type &key) const
- { return this->count(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Returns the number of contained elements with the given key
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal throw.
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type count(const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
- {
- size_type cnt;
- size_type n_bucket;
- this->priv_local_equal_range(key, hash_func, equal_func, n_bucket, cnt);
- return cnt;
- }
-
- //! <b>Effects</b>: Finds an iterator to the first element is equal to
- //! "value" or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE iterator find(const key_type &key)
- { return this->find(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Finds an iterator to the first element whose key is
- //! "key" according to the given hash and equality functor or end() if
- //! that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- iterator find(const KeyType &key, KeyHasher hash_func, KeyEqual equal_func)
- {
- size_type bucket_n;
- std::size_t hash;
- siterator prev;
- return iterator( this->priv_find(key, hash_func, equal_func, bucket_n, hash, prev)
- , &this->get_bucket_value_traits());
- }
-
- //! <b>Effects</b>: Finds a const_iterator to the first element whose key is
- //! "key" or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE const_iterator find(const key_type &key) const
- { return this->find(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Finds an iterator to the first element whose key is
- //! "key" according to the given hasher and equality functor or end() if
- //! that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- const_iterator find
- (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
- {
- size_type bucket_n;
- std::size_t hash_value;
- siterator prev;
- return const_iterator( this->priv_find(key, hash_func, equal_func, bucket_n, hash_value, prev)
- , &this->get_bucket_value_traits());
- }
-
- //! <b>Effects</b>: Returns a range containing all elements with values equivalent
- //! to value. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Returns a range containing all elements with equivalent
- //! keys. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(key, hash_func, equal_func)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or the equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator,iterator> equal_range
- (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func)
- {
- std::pair<siterator, siterator> ret =
- this->priv_equal_range(key, hash_func, equal_func);
- return std::pair<iterator, iterator>
- ( iterator(ret.first, &this->get_bucket_value_traits())
- , iterator(ret.second, &this->get_bucket_value_traits()));
- }
-
- //! <b>Effects</b>: Returns a range containing all elements with values equivalent
- //! to value. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Returns a range containing all elements with equivalent
- //! keys. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(key, hash_func, equal_func)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the hasher or equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<const_iterator,const_iterator> equal_range
- (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
- {
- std::pair<siterator, siterator> ret =
- this->priv_equal_range(key, hash_func, equal_func);
- return std::pair<const_iterator, const_iterator>
- ( const_iterator(ret.first, &this->get_bucket_value_traits())
- , const_iterator(ret.second, &this->get_bucket_value_traits()));
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid iterator belonging to the unordered_set
- //! that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the internal hash function throws.
- iterator iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_iterator belonging to the
- //! unordered_set that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the internal hash function throws.
- const_iterator iterator_to(const_reference value) const;
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid local_iterator belonging to the unordered_set
- //! that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This static function is available only if the <i>value traits</i>
- //! is stateless.
- static local_iterator s_local_iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_local_iterator belonging to
- //! the unordered_set that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This static function is available only if the <i>value traits</i>
- //! is stateless.
- static const_local_iterator s_local_iterator_to(const_reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid local_iterator belonging to the unordered_set
- //! that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- local_iterator local_iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_local_iterator belonging to
- //! the unordered_set that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_local_iterator local_iterator_to(const_reference value) const;
-
- //! <b>Effects</b>: Returns the number of buckets passed in the constructor
- //! or the last rehash function.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- size_type bucket_count() const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns the number of elements in the nth bucket.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- size_type bucket_size(size_type n) const;
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Returns the index of the bucket in which elements
- //! with keys equivalent to k would be found, if any such element existed.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the hash functor throws.
- //!
- //! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const key_type& k) const
- { return this->bucket(k, this->priv_hasher()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! <b>Effects</b>: Returns the index of the bucket in which elements
- //! with keys equivalent to k would be found, if any such element existed.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If hash_func throws.
- //!
- //! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
- template<class KeyType, class KeyHasher>
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const KeyType& k, KeyHasher hash_func) const
- { return this->priv_hash_to_bucket(hash_func(k)); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Returns the bucket array pointer passed in the constructor
- //! or the last rehash function.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- bucket_ptr bucket_pointer() const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a local_iterator pointing to the beginning
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- local_iterator begin(size_type n);
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the beginning
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator begin(size_type n) const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the beginning
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator cbegin(size_type n) const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a local_iterator pointing to the end
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- local_iterator end(size_type n);
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the end
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator end(size_type n) const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the end
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator cend(size_type n) const;
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: new_bucket_traits can hold a pointer to a new bucket array
- //! or the same as the old bucket array with a different length. new_size is the length of the
- //! the array pointed by new_buckets. If new_bucket_traits.bucket_begin() == this->bucket_pointer()
- //! new_bucket_traits.bucket_count() can be bigger or smaller than this->bucket_count().
- //! 'new_bucket_traits' copy constructor should not throw.
- //!
- //! <b>Effects</b>:
- //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is false,
- //! unlinks values from the old bucket and inserts then in the new one according
- //! to the hash value of values.
- //!
- //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is true,
- //! the implementations avoids moving values as much as possible.
- //!
- //! Bucket traits hold by *this is assigned from new_bucket_traits.
- //! If the container is configured as incremental<>, the split bucket is set
- //! to the new bucket_count().
- //!
- //! If store_hash option is true, this method does not use the hash function.
- //! If false, the implementation tries to minimize calls to the hash function
- //! (e.g. once for equivalent values if optimize_multikey<true> is true).
- //!
- //! If rehash is successful updates the internal bucket_traits with new_bucket_traits.
- //!
- //! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
- //!
- //! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
- BOOST_INTRUSIVE_FORCEINLINE void rehash(const bucket_traits &new_bucket_traits)
- { this->rehash_impl(new_bucket_traits, false); }
-
- //! <b>Note</b>: This function is used when keys from inserted elements are changed
- //! (e.g. a language change when key is a string) but uniqueness and hash properties are
- //! preserved so a fast full rehash recovers invariants for *this without extracting and
- //! reinserting all elements again.
- //!
- //! <b>Requires</b>: Calls produced to the hash function should not alter the value uniqueness
- //! properties of already inserted elements. If hasher(key1) == hasher(key2) was true when
- //! elements were inserted, it shall be true during calls produced in the execution of this function.
- //!
- //! key_equal is not called inside this function so it is assumed that key_equal(value1, value2)
- //! should produce the same results as before for inserted elements.
- //!
- //! <b>Effects</b>: Reprocesses all values hold by *this, recalculating their hash values
- //! and redistributing them though the buckets.
- //!
- //! If store_hash option is true, this method uses the hash function and updates the stored hash value.
- //!
- //! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
- //!
- //! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
- BOOST_INTRUSIVE_FORCEINLINE void full_rehash()
- { this->rehash_impl(this->priv_bucket_traits(), true); }
-
- //! <b>Requires</b>:
- //!
- //! <b>Effects</b>:
- //!
- //! <b>Complexity</b>:
- //!
- //! <b>Throws</b>:
- //!
- //! <b>Note</b>: this method is only available if incremental<true> option is activated.
- bool incremental_rehash(bool grow = true)
- {
- //This function is only available for containers with incremental hashing
- BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
- const size_type split_idx = this->priv_split_traits().get_size();
- const size_type bucket_cnt = this->bucket_count();
- const bucket_ptr buck_ptr = this->priv_bucket_pointer();
- bool ret = false;
-
- if(grow){
- //Test if the split variable can be changed
- if((ret = split_idx < bucket_cnt)){
- const size_type bucket_to_rehash = split_idx - bucket_cnt/2;
- bucket_type &old_bucket = buck_ptr[bucket_to_rehash];
- this->priv_split_traits().increment();
-
- //Anti-exception stuff: if an exception is thrown while
- //moving elements from old_bucket to the target bucket, all moved
- //elements are moved back to the original one.
- detail::incremental_rehash_rollback<bucket_type, split_traits> rollback
- ( buck_ptr[split_idx], old_bucket, this->priv_split_traits());
- for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
- ; i != end_sit; i = before_i, ++i){
- const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
- const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
- const size_type new_n = this->priv_hash_to_bucket(hash_value);
- siterator const last = (priv_last_in_group)(i);
- if(new_n == bucket_to_rehash){
- before_i = last;
- }
- else{
- bucket_type &new_b = buck_ptr[new_n];
- new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
- }
- }
- rollback.release();
- this->priv_erasure_update_cache();
- }
- }
- else if((ret = split_idx > bucket_cnt/2)){ //!grow
- const size_type target_bucket_num = split_idx - 1 - bucket_cnt/2;
- bucket_type &target_bucket = buck_ptr[target_bucket_num];
- bucket_type &source_bucket = buck_ptr[split_idx-1];
- target_bucket.splice_after(target_bucket.cbefore_begin(), source_bucket);
- this->priv_split_traits().decrement();
- this->priv_insertion_update_cache(target_bucket_num);
- }
- return ret;
- }
-
- //! <b>Effects</b>: If new_bucket_traits.bucket_count() is not
- //! this->bucket_count()/2 or this->bucket_count()*2, or
- //! this->split_bucket() != new_bucket_traits.bucket_count() returns false
- //! and does nothing.
- //!
- //! Otherwise, copy assigns new_bucket_traits to the internal bucket_traits
- //! and transfers all the objects from old buckets to the new ones.
- //!
- //! <b>Complexity</b>: Linear to size().
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Note</b>: this method is only available if incremental<true> option is activated.
- bool incremental_rehash(const bucket_traits &new_bucket_traits)
- {
- //This function is only available for containers with incremental hashing
- BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
- size_type const new_bucket_traits_size = new_bucket_traits.bucket_count();
- size_type const cur_bucket_traits = this->bucket_count();
- const size_type split_idx = this->split_count();
-
- //Test new bucket size is consistent with internal bucket size and split count
- if(new_bucket_traits_size/2 == cur_bucket_traits){
- if(!(split_idx >= cur_bucket_traits))
- return false;
- }
- else if(new_bucket_traits_size == cur_bucket_traits/2){
- if(!(split_idx <= new_bucket_traits_size))
- return false;
- }
- else{
- return false;
- }
-
- const size_type ini_n = this->priv_get_cache_bucket_num();
- const bucket_ptr old_buckets = this->priv_bucket_pointer();
- this->priv_bucket_traits() = new_bucket_traits;
- if(new_bucket_traits.bucket_begin() != old_buckets){
- for(size_type n = ini_n; n < split_idx; ++n){
- bucket_type &new_bucket = new_bucket_traits.bucket_begin()[n];
- bucket_type &old_bucket = old_buckets[n];
- new_bucket.splice_after(new_bucket.cbefore_begin(), old_bucket);
- }
- //Put cache to safe position
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(ini_n);
- }
- return true;
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: incremental<> option must be set
- //!
- //! <b>Effects</b>: returns the current split count
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing
- size_type split_count() const;
-
- //! <b>Effects</b>: Returns the nearest new bucket count optimized for
- //! the container that is bigger or equal than n. This suggestion can be
- //! used to create bucket arrays with a size that will usually improve
- //! container's performance. If such value does not exist, the
- //! higher possible value is returned.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //!
- //! <b>Throws</b>: Nothing.
- static size_type suggested_upper_bucket_count(size_type n);
-
- //! <b>Effects</b>: Returns the nearest new bucket count optimized for
- //! the container that is smaller or equal than n. This suggestion can be
- //! used to create bucket arrays with a size that will usually improve
- //! container's performance. If such value does not exist, the
- //! lowest possible value is returned.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //!
- //! <b>Throws</b>: Nothing.
- static size_type suggested_lower_bucket_count(size_type n);
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-
- friend bool operator==(const hashtable_impl &x, const hashtable_impl &y)
- {
- //Taken from N3068
- if(constant_time_size && x.size() != y.size()){
- return false;
- }
- for (const_iterator ix = x.cbegin(), ex = x.cend(); ix != ex; ++ix){
- std::pair<const_iterator, const_iterator> eqx(x.equal_range(key_of_value()(*ix))),
- eqy(y.equal_range(key_of_value()(*ix)));
- if (boost::intrusive::iterator_distance(eqx.first, eqx.second) !=
- boost::intrusive::iterator_distance(eqy.first, eqy.second) ||
- !(priv_algo_is_permutation)(eqx.first, eqx.second, eqy.first) ){
- return false;
- }
- ix = eqx.second;
- }
- return true;
- }
-
- friend bool operator!=(const hashtable_impl &x, const hashtable_impl &y)
- { return !(x == y); }
-
- friend bool operator<(const hashtable_impl &x, const hashtable_impl &y)
- { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- friend bool operator>(const hashtable_impl &x, const hashtable_impl &y)
- { return y < x; }
-
- friend bool operator<=(const hashtable_impl &x, const hashtable_impl &y)
- { return !(y < x); }
-
- friend bool operator>=(const hashtable_impl &x, const hashtable_impl &y)
- { return !(x < y); }
-
- /// @cond
- BOOST_INTRUSIVE_FORCEINLINE void check() const {}
- private:
-
- void rehash_impl(const bucket_traits &new_bucket_traits, bool do_full_rehash)
- {
- const bucket_ptr new_buckets = new_bucket_traits.bucket_begin();
- size_type new_bucket_count = new_bucket_traits.bucket_count();
- const bucket_ptr old_buckets = this->priv_bucket_pointer();
- size_type old_bucket_count = this->bucket_count();
-
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (new_bucket_count & (new_bucket_count-1u))));
-
- size_type n = this->priv_get_cache_bucket_num();
- const bool same_buffer = old_buckets == new_buckets;
- //If the new bucket length is a common factor
- //of the old one we can avoid hash calculations.
- const bool fast_shrink = (!do_full_rehash) && (!incremental) && (old_bucket_count >= new_bucket_count) &&
- (power_2_buckets || (old_bucket_count % new_bucket_count) == 0);
- //If we are shrinking the same bucket array and it's
- //is a fast shrink, just rehash the last nodes
- size_type new_first_bucket_num = new_bucket_count;
- if(same_buffer && fast_shrink && (n < new_bucket_count)){
- new_first_bucket_num = n;
- n = new_bucket_count;
- }
-
- //Anti-exception stuff: they destroy the elements if something goes wrong.
- //If the source and destination buckets are the same, the second rollback function
- //is harmless, because all elements have been already unlinked and destroyed
- typedef detail::init_disposer<node_algorithms> NodeDisposer;
- typedef detail::exception_array_disposer<bucket_type, NodeDisposer, size_type> ArrayDisposer;
- NodeDisposer node_disp;
- ArrayDisposer rollback1(new_buckets[0], node_disp, new_bucket_count);
- ArrayDisposer rollback2(old_buckets[0], node_disp, old_bucket_count);
-
- //Put size in a safe value for rollback exception
- size_type const size_backup = this->priv_size_traits().get_size();
- this->priv_size_traits().set_size(0);
- //Put cache to safe position
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(size_type(0u));
-
- //Iterate through nodes
- for(; n < old_bucket_count; ++n){
- bucket_type &old_bucket = old_buckets[n];
- if(!fast_shrink){
- for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
- ; i != end_sit
- ; i = before_i, ++i){
-
- //First obtain hash value (and store it if do_full_rehash)
- std::size_t hash_value;
- if(do_full_rehash){
- value_type &v = this->priv_value_from_slist_node(i.pointed_node());
- hash_value = this->priv_hasher()(key_of_value()(v));
- node_functions_t::store_hash(pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(v)), hash_value, store_hash_t());
- }
- else{
- const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
- hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
- }
-
- //Now calculate the new bucket position
- const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>
- (hash_value, new_bucket_count, new_bucket_count);
-
- //Update first used bucket cache
- if(cache_begin && new_n < new_first_bucket_num)
- new_first_bucket_num = new_n;
-
- //If the target bucket is new, transfer the whole group
- siterator const last = (priv_last_in_group)(i);
-
- if(same_buffer && new_n == n){
- before_i = last;
- }
- else{
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
- }
- }
- }
- else{
- const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>(n, new_bucket_count, new_bucket_count);
- if(cache_begin && new_n < new_first_bucket_num)
- new_first_bucket_num = new_n;
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after( new_b.before_begin()
- , old_bucket
- , old_bucket.before_begin()
- , bucket_plus_vtraits_t::priv_get_last(old_bucket, optimize_multikey_t()));
- }
- }
-
- this->priv_size_traits().set_size(size_backup);
- this->priv_split_traits().set_size(new_bucket_count);
- if(&new_bucket_traits != &this->priv_bucket_traits()){
- this->priv_bucket_traits() = new_bucket_traits;
- }
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(new_first_bucket_num);
- rollback1.release();
- rollback2.release();
- }
-
- template <class MaybeConstHashtableImpl, class Cloner, class Disposer>
- void priv_clone_from(MaybeConstHashtableImpl &src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- if(!constant_time_size || !src.empty()){
- const size_type src_bucket_count = src.bucket_count();
- const size_type dst_bucket_count = this->bucket_count();
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (src_bucket_count & (src_bucket_count-1))));
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (dst_bucket_count & (dst_bucket_count-1))));
- //If src bucket count is bigger or equal, structural copy is possible
- const bool structural_copy = (!incremental) && (src_bucket_count >= dst_bucket_count) &&
- (power_2_buckets || (src_bucket_count % dst_bucket_count) == 0);
- if(structural_copy){
- this->priv_structural_clone_from(src, cloner, disposer);
- }
- else{
- //Unlike previous cloning algorithm, this can throw
- //if cloner, hasher or comparison functor throw
- typedef typename detail::if_c< detail::is_const<MaybeConstHashtableImpl>::value
- , typename MaybeConstHashtableImpl::const_iterator
- , typename MaybeConstHashtableImpl::iterator
- >::type clone_iterator;
- clone_iterator b(src.begin()), e(src.end());
- detail::exception_disposer<hashtable_impl, Disposer> rollback(*this, disposer);
- for(; b != e; ++b){
- //No need to check for duplicates and insert it in the first position
- //as this is an unordered container. So use minimal insertion code
- std::size_t const hash_to_store = this->priv_stored_or_compute_hash(*b, store_hash_t());;
- size_type const bucket_number = this->priv_hash_to_bucket(hash_to_store);
- typedef typename detail::if_c
- <detail::is_const<MaybeConstHashtableImpl>::value, const_reference, reference>::type reference_type;
- reference_type r = *b;
- this->priv_clone_front_in_bucket<reference_type>(bucket_number, r, hash_to_store, cloner);
- }
- rollback.release();
- }
- }
- }
-
- template<class ValueReference, class Cloner>
- void priv_clone_front_in_bucket( size_type const bucket_number
- , typename detail::identity<ValueReference>::type src_ref
- , std::size_t const hash_to_store, Cloner cloner)
- {
- //No need to check for duplicates and insert it in the first position
- //as this is an unordered container. So use minimal insertion code
- //std::size_t const hash_value = this->priv_stored_or_compute_hash(src_ref, store_hash_t());;
- //size_type const bucket_number = this->priv_hash_to_bucket(hash_value);
- bucket_type &cur_bucket = this->priv_bucket_pointer()[bucket_number];
- siterator const prev(cur_bucket.before_begin());
- //Just check if the cloned node is equal to the first inserted value in the new bucket
- //as equal src values were contiguous and they should be already inserted in the
- //destination bucket.
- bool const next_is_in_group = optimize_multikey && !cur_bucket.empty() &&
- this->priv_equal()( key_of_value()(src_ref)
- , key_of_value()(this->priv_value_from_slist_node((++siterator(prev)).pointed_node())));
- this->priv_insert_equal_after_find(*cloner(src_ref), bucket_number, hash_to_store, prev, next_is_in_group);
- }
-
- template <class MaybeConstHashtableImpl, class Cloner, class Disposer>
- void priv_structural_clone_from(MaybeConstHashtableImpl &src, Cloner cloner, Disposer disposer)
- {
- //First clone the first ones
- const size_type src_bucket_count = src.bucket_count();
- const size_type dst_bucket_count = this->bucket_count();
- const bucket_ptr src_buckets = src.priv_bucket_pointer();
- const bucket_ptr dst_buckets = this->priv_bucket_pointer();
- size_type constructed = 0;
- typedef node_cast_adaptor< detail::node_disposer<Disposer, value_traits, CircularSListAlgorithms>
- , slist_node_ptr, node_ptr > NodeDisposer;
- NodeDisposer node_disp(disposer, &this->priv_value_traits());
-
- detail::exception_array_disposer<bucket_type, NodeDisposer, size_type>
- rollback(dst_buckets[0], node_disp, constructed);
- //Now insert the remaining ones using the modulo trick
- for( //"constructed" already initialized
- ; constructed < src_bucket_count
- ; ++constructed){
- //Since incremental hashing can't be structurally copied, avoid hash_to_bucket_split
- const std::size_t new_n = detail::hash_to_bucket(constructed, dst_bucket_count, detail::bool_<power_2_buckets>());
- bucket_type &src_b = src_buckets[constructed];
- for( siterator b(src_b.begin()), e(src_b.end()); b != e; ++b){
- slist_node_ptr const n(b.pointed_node());
- typedef typename detail::if_c
- <detail::is_const<MaybeConstHashtableImpl>::value, const_reference, reference>::type reference_type;
- reference_type r = this->priv_value_from_slist_node(n);
- this->priv_clone_front_in_bucket<reference_type>
- (new_n, r, this->priv_stored_hash(n, store_hash_t()), cloner);
- }
- }
- this->priv_hasher() = src.priv_hasher();
- this->priv_equal() = src.priv_equal();
- rollback.release();
- this->priv_size_traits().set_size(src.priv_size_traits().get_size());
- this->priv_split_traits().set_size(dst_bucket_count);
- this->priv_insertion_update_cache(0u);
- this->priv_erasure_update_cache();
- }
-
- std::size_t priv_hash_to_bucket(std::size_t hash_value) const
- {
- return detail::hash_to_bucket_split<power_2_buckets, incremental>
- (hash_value, this->priv_bucket_traits().bucket_count(), this->priv_split_traits().get_size());
- }
-
- iterator priv_insert_equal_after_find(reference value, size_type bucket_num, std::size_t hash_value, siterator prev, bool const next_is_in_group)
- {
- //Now store hash if needed
- node_ptr n = pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(value));
- node_functions_t::store_hash(n, hash_value, store_hash_t());
- //Checks for some modes
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
- //Shortcut to optimize_multikey cases
- group_functions_t::insert_in_group
- ( next_is_in_group ? detail::dcast_bucket_ptr<node>((++siterator(prev)).pointed_node()) : n
- , n, optimize_multikey_t());
- //Update cache and increment size if needed
- this->priv_insertion_update_cache(bucket_num);
- this->priv_size_traits().increment();
- //Insert the element in the bucket after it
- return iterator(bucket_type::s_insert_after(prev, *n), &this->get_bucket_value_traits());
- }
-
- template<class KeyType, class KeyHasher, class KeyEqual>
- siterator priv_find //In case it is not found previt is bucket.before_begin()
- ( const KeyType &key, KeyHasher hash_func
- , KeyEqual equal_func, size_type &bucket_number, std::size_t &h, siterator &previt) const
- {
- h = hash_func(key);
- return this->priv_find_with_hash(key, equal_func, bucket_number, h, previt);
- }
-
- template<class KeyType, class KeyEqual>
- bool priv_is_value_equal_to_key(const value_type &v, const std::size_t h, const KeyType &key, KeyEqual equal_func) const
- {
- (void)h;
- return (!compare_hash || this->priv_stored_or_compute_hash(v, store_hash_t()) == h) && equal_func(key, key_of_value()(v));
- }
-
- //return previous iterator to the next equal range group in case
- static siterator priv_last_in_group(const siterator &it_first_in_group)
- {
- return bucket_type::s_iterator_to
- (*group_functions_t::get_last_in_group
- (detail::dcast_bucket_ptr<node>(it_first_in_group.pointed_node()), optimize_multikey_t()));
- }
-
- template<class KeyType, class KeyEqual>
- siterator priv_find_with_hash //In case it is not found previt is bucket.before_begin()
- ( const KeyType &key, KeyEqual equal_func, size_type &bucket_number, const std::size_t h, siterator &previt) const
- {
- bucket_number = this->priv_hash_to_bucket(h);
- bucket_type &b = this->priv_bucket_pointer()[bucket_number];
- previt = b.before_begin();
- siterator it = previt;
- siterator const endit = b.end();
-
- while(++it != endit){
- if(this->priv_is_value_equal_to_key(this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func)){
- return it;
- }
- previt = it = (priv_last_in_group)(it);
- }
- previt = b.before_begin();
- return this->priv_invalid_local_it();
- }
-
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<siterator, siterator> priv_local_equal_range
- ( const KeyType &key
- , KeyHasher hash_func
- , KeyEqual equal_func
- , size_type &found_bucket
- , size_type &cnt) const
- {
- size_type internal_cnt = 0;
- //Let's see if the element is present
-
- siterator prev;
- size_type n_bucket;
- std::size_t h;
- std::pair<siterator, siterator> to_return
- ( this->priv_find(key, hash_func, equal_func, n_bucket, h, prev)
- , this->priv_invalid_local_it());
-
- if(to_return.first != to_return.second){
- found_bucket = n_bucket;
- //If it's present, find the first that it's not equal in
- //the same bucket
- bucket_type &b = this->priv_bucket_pointer()[n_bucket];
- siterator it = to_return.first;
- ++internal_cnt; //At least one is found
- if(optimize_multikey){
- to_return.second = ++(priv_last_in_group)(it);
- internal_cnt += boost::intrusive::iterator_distance(++it, to_return.second);
- }
- else{
- siterator const bend = b.end();
- while(++it != bend &&
- this->priv_is_value_equal_to_key(this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func)){
- ++internal_cnt;
- }
- to_return.second = it;
- }
- }
- cnt = internal_cnt;
- return to_return;
- }
-
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<siterator, siterator> priv_equal_range
- ( const KeyType &key
- , KeyHasher hash_func
- , KeyEqual equal_func) const
- {
- size_type n_bucket;
- size_type cnt;
-
- //Let's see if the element is present
- std::pair<siterator, siterator> to_return
- (this->priv_local_equal_range(key, hash_func, equal_func, n_bucket, cnt));
- //If not, find the next element as ".second" if ".second" local iterator
- //is not pointing to an element.
- bucket_ptr const bp = this->priv_bucket_pointer();
- if(to_return.first != to_return.second &&
- to_return.second == bp[n_bucket].end()){
- to_return.second = this->priv_invalid_local_it();
- ++n_bucket;
- for( const size_type max_bucket = this->bucket_count()
- ; n_bucket != max_bucket
- ; ++n_bucket){
- bucket_type &b = bp[n_bucket];
- if(!b.empty()){
- to_return.second = b.begin();
- break;
- }
- }
- }
- return to_return;
- }
-
- std::size_t priv_get_bucket_num(siterator it)
- { return this->priv_get_bucket_num_hash_dispatch(it, store_hash_t()); }
-
- std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::true_) //store_hash
- {
- return this->priv_hash_to_bucket
- (this->priv_stored_hash(it.pointed_node(), store_hash_t()));
- }
-
- std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::false_) //NO store_hash
- { return this->priv_get_bucket_num_no_hash_store(it, optimize_multikey_t()); }
-
- static siterator priv_get_previous(bucket_type &b, siterator i)
- { return bucket_plus_vtraits_t::priv_get_previous(b, i, optimize_multikey_t()); }
-
- /// @endcond
-};
-
-/// @cond
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template < class T
- , bool UniqueKeys
- , class PackedOptions
- >
-#else
-template <class T, bool UniqueKeys, class ...Options>
-#endif
-struct make_bucket_traits
-{
- //Real value traits must be calculated from options
- typedef typename detail::get_value_traits
- <T, typename PackedOptions::proto_value_traits>::type value_traits;
-
- typedef typename PackedOptions::bucket_traits specified_bucket_traits;
-
- //Real bucket traits must be calculated from options and calculated value_traits
- typedef typename detail::get_slist_impl
- <typename detail::reduced_slist_node_traits
- <typename value_traits::node_traits>::type
- >::type slist_impl;
-
- typedef typename
- detail::if_c< detail::is_same
- < specified_bucket_traits
- , default_bucket_traits
- >::value
- , detail::bucket_traits_impl<slist_impl>
- , specified_bucket_traits
- >::type type;
-};
-/// @endcond
-
-//! Helper metafunction to define a \c hashtable that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void
- , class O7 = void, class O8 = void
- , class O9 = void, class O10= void
- >
-#endif
-struct make_hashtable
-{
- /// @cond
- typedef typename pack_options
- < hashtable_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef typename make_bucket_traits
- <T, false, packed_options>::type bucket_traits;
-
- typedef hashtable_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::hash
- , typename packed_options::equal
- , bucket_traits
- , typename packed_options::size_type
- , (std::size_t(false)*hash_bool_flags::unique_keys_pos)
- |(std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
- |(std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
- |(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)
- > implementation_defined;
-
- /// @endcond
- typedef implementation_defined type;
-};
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
-#endif
-class hashtable
- : public make_hashtable<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_hashtable<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(hashtable)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::bucket_ptr bucket_ptr;
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::bucket_traits bucket_traits;
- typedef typename Base::key_equal key_equal;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- BOOST_INTRUSIVE_FORCEINLINE explicit hashtable ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b_traits, hash_func, equal_func, v_traits)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable(BOOST_RV_REF(hashtable) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable& operator=(BOOST_RV_REF(hashtable) x)
- { return static_cast<hashtable&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_HASHTABLE_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/member_value_traits.hpp b/contrib/restricted/boost/boost/intrusive/member_value_traits.hpp
deleted file mode 100644
index 0ab7ffb1122..00000000000
--- a/contrib/restricted/boost/boost/intrusive/member_value_traits.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (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_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 <boost/intrusive/detail/parent_from_member.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//!This value traits template is used to create value traits
-//!from user defined node traits where value_traits::value_type will
-//!store a node_traits::node
-template< class T, class NodeTraits
- , typename NodeTraits::node T::* PtrToMember
- , link_mode_type LinkMode
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- = safe_link
- #endif
->
-struct member_value_traits
-{
- public:
- typedef NodeTraits node_traits;
- typedef T value_type;
- typedef typename node_traits::node node;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef pointer_traits<node_ptr> node_ptr_traits;
- typedef typename pointer_traits<node_ptr>::template
- rebind_pointer<T>::type pointer;
- typedef typename pointer_traits<node_ptr>::template
- rebind_pointer<const T>::type const_pointer;
- //typedef typename pointer_traits<pointer>::reference reference;
- //typedef typename pointer_traits<const_pointer>::reference const_reference;
- typedef value_type & reference;
- typedef const value_type & const_reference;
- static const link_mode_type link_mode = LinkMode;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr(reference value)
- { return pointer_traits<node_ptr>::pointer_to(value.*PtrToMember); }
-
- BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr(const_reference value)
- { return pointer_traits<const_node_ptr>::pointer_to(value.*PtrToMember); }
-
- BOOST_INTRUSIVE_FORCEINLINE static pointer to_value_ptr(const node_ptr &n)
- {
- return pointer_traits<pointer>::pointer_to(*detail::parent_from_member<value_type, node>
- (boost::movelib::to_raw_pointer(n), PtrToMember));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static const_pointer to_value_ptr(const const_node_ptr &n)
- {
- return pointer_traits<const_pointer>::pointer_to(*detail::parent_from_member<value_type, node>
- (boost::movelib::to_raw_pointer(n), PtrToMember));
-
- }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_MEMBER_VALUE_TRAITS_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/priority_compare.hpp b/contrib/restricted/boost/boost/intrusive/priority_compare.hpp
deleted file mode 100644
index f5589ce27b2..00000000000
--- a/contrib/restricted/boost/boost/intrusive/priority_compare.hpp
+++ /dev/null
@@ -1,82 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2008
-//
-// 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_PRIORITY_COMPARE_HPP
-#define BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class U>
-void priority_order();
-
-/// @endcond
-
-template <class T = void>
-struct priority_compare
-{
- //Compatibility with std::binary_function
- typedef T first_argument_type;
- typedef T second_argument_type;
- typedef bool result_type;
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &val, const T &val2) const
- {
- return priority_order(val, val2);
- }
-};
-
-template <>
-struct priority_compare<void>
-{
- template<class T, class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const T &t, const U &u) const
- {
- return priority_order(t, u);
- }
-};
-
-/// @cond
-
-template<class PrioComp, class T>
-struct get_prio
-{
- typedef PrioComp type;
-};
-
-
-template<class T>
-struct get_prio<void, T>
-{
- typedef ::boost::intrusive::priority_compare<T> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_PRIORITY_COMPARE_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/sg_set.hpp b/contrib/restricted/boost/boost/intrusive/sg_set.hpp
deleted file mode 100644
index 745c3790b99..00000000000
--- a/contrib/restricted/boost/boost/intrusive/sg_set.hpp
+++ /dev/null
@@ -1,1094 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// 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_SG_SET_HPP
-#define BOOST_INTRUSIVE_SG_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/sgtree.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/move/utility_core.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class sg_multiset_impl;
-#endif
-
-//! The class template sg_set is an intrusive container, that mimics most of
-//! the interface of std::sg_set as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c floating_point<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool FloatingPoint, typename HeaderHolder>
-#endif
-class sg_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder>
-#endif
-{
- /// @cond
- typedef sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_set_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::sgtree::sgtree()
- sg_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(const key_compare &,const value_traits &)
- explicit sg_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- sg_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(sgtree &&)
- sg_set_impl(BOOST_RV_REF(sg_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::operator=(sgtree &&)
- sg_set_impl& operator=(BOOST_RV_REF(sg_set_impl) x)
- { return static_cast<sg_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::~sgtree()
- ~sg_set_impl();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::sgtree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::sgtree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::sgtree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::sgtree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
- static sg_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
- static const sg_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
- static sg_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
- static const sg_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::sgtree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::sgtree::swap
- void swap(sg_set_impl& other);
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(const sgtree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const sg_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(sgtree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::sgtree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::sgtree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::sgtree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor()
- float balance_factor() const;
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
- void balance_factor(float new_alpha);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_unique
- template<class ...Options2>
- void merge(sg_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::rbtree::merge_unique
- template<class ...Options2>
- void merge(sg_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- template<class Compare2>
- void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const sg_set_impl<T, Options...> &x, const sg_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(sg_set_impl<T, Options...> &x, sg_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c sg_set that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_sg_set
-{
- /// @cond
- typedef typename pack_options
- < sgtree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef sg_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::floating_point
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class sg_set
- : public make_sg_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_sg_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_set)
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- sg_set()
- : Base()
- {}
-
- explicit sg_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- sg_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- sg_set(BOOST_RV_REF(sg_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- sg_set& operator=(BOOST_RV_REF(sg_set) x)
- { return static_cast<sg_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const sg_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static sg_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<sg_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const sg_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const sg_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static sg_set &container_from_iterator(iterator it)
- { return static_cast<sg_set &>(Base::container_from_iterator(it)); }
-
- static const sg_set &container_from_iterator(const_iterator it)
- { return static_cast<const sg_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template sg_multiset is an intrusive container, that mimics most of
-//! the interface of std::sg_multiset as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c floating_point<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool FloatingPoint, typename HeaderHolder>
-#endif
-class sg_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder>
-#endif
-{
- /// @cond
- typedef sgtree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, FloatingPoint, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_multiset_impl)
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::sgtree::sgtree()
- sg_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(const key_compare &,const value_traits &)
- explicit sg_multiset_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- sg_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::sgtree(sgtree &&)
- sg_multiset_impl(BOOST_RV_REF(sg_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::sgtree::operator=(sgtree &&)
- sg_multiset_impl& operator=(BOOST_RV_REF(sg_multiset_impl) x)
- { return static_cast<sg_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::~sgtree()
- ~sg_multiset_impl();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::sgtree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::sgtree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::sgtree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::sgtree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::sgtree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::sgtree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::sgtree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::sgtree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::sgtree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(iterator)
- static sg_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_end_iterator(const_iterator)
- static const sg_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(iterator)
- static sg_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::container_from_iterator(const_iterator)
- static const sg_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::sgtree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::sgtree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::sgtree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::sgtree::swap
- void swap(sg_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(const sgtree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const sg_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::sgtree::clone_from(sgtree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::sgtree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::sgtree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::sgtree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::sgtree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::sgtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::sgtree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::sgtree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::sgtree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor()
- float balance_factor() const;
-
- //! @copydoc ::boost::intrusive::sgtree::balance_factor(float)
- void balance_factor(float new_alpha);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(sg_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(sg_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(sg_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(sg_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, FloatingPoint, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const sg_multiset_impl<T, Options...> &x, const sg_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(sg_multiset_impl<T, Options...> &x, sg_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c sg_multiset that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_sg_multiset
-{
- /// @cond
- typedef typename pack_options
- < sgtree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef sg_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::floating_point
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class sg_multiset
- : public make_sg_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_sg_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(sg_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- sg_multiset()
- : Base()
- {}
-
- explicit sg_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- sg_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- sg_multiset(BOOST_RV_REF(sg_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- sg_multiset& operator=(BOOST_RV_REF(sg_multiset) x)
- { return static_cast<sg_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const sg_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(sg_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static sg_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const sg_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const sg_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static sg_multiset &container_from_iterator(iterator it)
- { return static_cast<sg_multiset &>(Base::container_from_iterator(it)); }
-
- static const sg_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const sg_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SG_SET_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/splay_set.hpp b/contrib/restricted/boost/boost/intrusive/splay_set.hpp
deleted file mode 100644
index da7662eeb14..00000000000
--- a/contrib/restricted/boost/boost/intrusive/splay_set.hpp
+++ /dev/null
@@ -1,1110 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// 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_HPP
-#define BOOST_INTRUSIVE_SPLAY_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/splaytree.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class splay_multiset_impl;
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! The class template splay_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class splay_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- typedef splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_set_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::splaytree::splaytree()
- splay_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(const key_compare &,const value_traits &)
- explicit splay_set_impl( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- splay_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(splaytree &&)
- splay_set_impl(BOOST_RV_REF(splay_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::operator=(splaytree &&)
- splay_set_impl& operator=(BOOST_RV_REF(splay_set_impl) x)
- { return static_cast<splay_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::~splaytree()
- ~splay_set_impl();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::splaytree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::splaytree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::splaytree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::splaytree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
- static splay_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
- static const splay_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
- static splay_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
- static const splay_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::splaytree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::splaytree::swap
- void swap(splay_set_impl& other);
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(const splaytree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const splay_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(splaytree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::rbtree::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const key_type &key
- ,insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique_check(const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator, bool> insert_check
- (const_iterator hint, const KeyType &key
- ,KeyTypeKeyCompare comp, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, commit_data); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::rbtree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&,const key_type&,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&,const key_type&,bool,bool)const
- std::pair<const_iterator, const_iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::splaytree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::splaytree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
- void splay_up(iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const key_type &key)
- iterator splay_down(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_unique
- template<class ...Options2>
- void merge(splay_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_unique
- template<class ...Options2>
- void merge(splay_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
-
- template<class Compare2>
- void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const splay_set_impl<T, Options...> &x, const splay_set_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(splay_set_impl<T, Options...> &x, splay_set_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c splay_set that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_splay_set
-{
- /// @cond
- typedef typename pack_options
- < splaytree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef splay_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class splay_set
- : public make_splay_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_splay_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_set)
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- splay_set()
- : Base()
- {}
-
- explicit splay_set( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- splay_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- splay_set(BOOST_RV_REF(splay_set) x)
- : Base(::boost::move(static_cast<Base&>(x)))
- {}
-
- splay_set& operator=(BOOST_RV_REF(splay_set) x)
- { return static_cast<splay_set &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const splay_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static splay_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<splay_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const splay_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const splay_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static splay_set &container_from_iterator(iterator it)
- { return static_cast<splay_set &>(Base::container_from_iterator(it)); }
-
- static const splay_set &container_from_iterator(const_iterator it)
- { return static_cast<const splay_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template splay_multiset is an intrusive container, that mimics most of
-//! the interface of std::multiset as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<> and
-//! \c compare<>.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class Compare, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class splay_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- typedef splaytree_impl<ValueTraits, VoidOrKeyOfValue, Compare, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_multiset_impl)
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = tree_type::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::splaytree::splaytree()
- splay_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(const key_compare &,const value_traits &)
- explicit splay_multiset_impl(const key_compare &cmp, const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(bool,Iterator,Iterator,const key_compare &,const value_traits &)
- template<class Iterator>
- splay_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::splaytree(splaytree &&)
- splay_multiset_impl(BOOST_RV_REF(splay_multiset_impl) x)
- : tree_type(::boost::move(static_cast<tree_type&>(x)))
- {}
-
- //! @copydoc ::boost::intrusive::splaytree::operator=(splaytree &&)
- splay_multiset_impl& operator=(BOOST_RV_REF(splay_multiset_impl) x)
- { return static_cast<splay_multiset_impl&>(tree_type::operator=(::boost::move(static_cast<tree_type&>(x)))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::~splaytree()
- ~splay_multiset_impl();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::splaytree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::splaytree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::splaytree::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::splaytree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::splaytree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::splaytree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::splaytree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::splaytree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::splaytree::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(iterator)
- static splay_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_end_iterator(const_iterator)
- static const splay_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(iterator)
- static splay_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::container_from_iterator(const_iterator)
- static const splay_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::splaytree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::splaytree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::splaytree::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::splaytree::swap
- void swap(splay_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(const splaytree&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const splay_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::splaytree::clone_from(splaytree&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::splaytree::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::splaytree::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const key_type&)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const key_type&, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::splaytree::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::splaytree::count(const key_type&)
- size_type count(const key_type&);
-
- //! @copydoc ::boost::intrusive::splaytree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type&)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const key_type&)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type&)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const key_type&)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type&)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::find(const key_type&)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const key_type&)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const key_type&)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::splaytree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&, const key_type&,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const key_type&, const key_type&,bool,bool)const
- std::pair<const_iterator, const_iterator> bounded_range
- (const_reference lower_value, const_reference upper_value, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::splaytree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::splaytree::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_up(iterator)
- void splay_up(iterator i);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator splay_down(const KeyType &key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::splaytree::splay_down(const key_type &key)
- iterator splay_down(const key_type &key);
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance
- void rebalance();
-
- //! @copydoc ::boost::intrusive::splaytree::rebalance_subtree
- iterator rebalance_subtree(iterator root);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_equal
- template<class ...Options2>
- void merge(splay_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::splaytree::merge_equal
- template<class ...Options2>
- void merge(splay_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(splay_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(splay_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<class T, class ...Options>
-bool operator!= (const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator<=(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-bool operator>=(const splay_multiset_impl<T, Options...> &x, const splay_multiset_impl<T, Options...> &y);
-
-template<class T, class ...Options>
-void swap(splay_multiset_impl<T, Options...> &x, splay_multiset_impl<T, Options...> &y);
-
-#endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//! Helper metafunction to define a \c splay_multiset that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_splay_multiset
-{
- /// @cond
- typedef typename pack_options
- < splaytree_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef splay_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class splay_multiset
- : public make_splay_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_splay_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(splay_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- splay_multiset()
- : Base()
- {}
-
- explicit splay_multiset( const key_compare &cmp, const value_traits &v_traits = value_traits())
- : Base(cmp, v_traits)
- {}
-
- template<class Iterator>
- splay_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, v_traits)
- {}
-
- splay_multiset(BOOST_RV_REF(splay_multiset) x)
- : Base(::boost::move(static_cast<Base&>(x)))
- {}
-
- splay_multiset& operator=(BOOST_RV_REF(splay_multiset) x)
- { return static_cast<splay_multiset &>(this->Base::operator=(::boost::move(static_cast<Base&>(x)))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const splay_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(splay_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static splay_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const splay_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const splay_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static splay_multiset &container_from_iterator(iterator it)
- { return static_cast<splay_multiset &>(Base::container_from_iterator(it)); }
-
- static const splay_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const splay_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SPLAY_SET_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/treap.hpp b/contrib/restricted/boost/boost/intrusive/treap.hpp
deleted file mode 100644
index c6f63ff2deb..00000000000
--- a/contrib/restricted/boost/boost/intrusive/treap.hpp
+++ /dev/null
@@ -1,1344 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2008-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_TREAP_HPP
-#define BOOST_INTRUSIVE_TREAP_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/bs_set_hook.hpp>
-#include <boost/intrusive/bstree.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/treap_algorithms.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/priority_compare.hpp>
-#include <boost/intrusive/detail/node_cloner_disposer.hpp>
-#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
-
-#include <boost/static_assert.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/move/adl_move_swap.hpp>
-
-#include <cstddef>
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-struct treap_defaults
- : bstree_defaults
-{
- typedef void priority;
-};
-
-/// @endcond
-
-//! The class template treap is an intrusive treap container that
-//! is used to construct intrusive set and multiset containers. The no-throw
-//! guarantee holds only, if the key_compare object and priority_compare object
-//! don't throw.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>,
-//! \c compare<> and \c priority_compare<>
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class treap_impl
- /// @cond
- : public bstree_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>
- //Use public inheritance to avoid MSVC bugs with closures
- , public detail::ebo_functor_holder
- < typename get_prio
- < VoidOrPrioComp
- , typename bstree_impl
- <ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType, ConstantTimeSize, BsTreeAlgorithms, HeaderHolder>::key_type>::type
- >
- /// @endcond
-{
- public:
- typedef ValueTraits value_traits;
- /// @cond
- typedef bstree_impl< ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, SizeType
- , ConstantTimeSize, BsTreeAlgorithms
- , HeaderHolder> tree_type;
- typedef tree_type implementation_defined;
- typedef get_prio
- < VoidOrPrioComp
- , typename tree_type::key_type> get_prio_type;
-
- typedef detail::ebo_functor_holder
- <typename get_prio_type::type> prio_base;
-
- /// @endcond
-
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::node_traits node_traits;
- 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 BOOST_INTRUSIVE_IMPDEF(treap_algorithms<node_traits>) node_algorithms;
- typedef BOOST_INTRUSIVE_IMPDEF(typename get_prio_type::type) priority_compare;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
- static const bool stateful_value_traits = implementation_defined::stateful_value_traits;
- static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
-
- typedef detail::key_nodeptr_comp<priority_compare, value_traits, key_of_value> key_node_prio_comp_t;
-
- template<class KeyPrioComp>
- detail::key_nodeptr_comp<KeyPrioComp, value_traits, key_of_value> key_node_prio_comp(KeyPrioComp keypriocomp) const
- { return detail::key_nodeptr_comp<KeyPrioComp, value_traits, key_of_value>(keypriocomp, &this->get_value_traits()); }
-
- /// @cond
- private:
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_impl)
-
- const priority_compare &priv_pcomp() const
- { return static_cast<const prio_base&>(*this).get(); }
-
- priority_compare &priv_pcomp()
- { return static_cast<prio_base&>(*this).get(); }
-
- /// @endcond
-
- public:
- typedef typename node_algorithms::insert_commit_data insert_commit_data;
-
- //! <b>Effects</b>: Constructs an empty container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee.
- treap_impl()
- : tree_type(), prio_base(priority_compare())
- {}
-
- //! <b>Effects</b>: Constructs an empty container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor of the value_compare/priority_compare objects throw. Basic guarantee.
- explicit treap_impl( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits), prio_base(pcmp)
- {}
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
- //! cmp must be a comparison function that induces a strict weak ordering.
- //!
- //! <b>Effects</b>: Constructs an empty container and inserts elements from
- //! [b, e).
- //!
- //! <b>Complexity</b>: Linear in N if [b, e) is already sorted using
- //! comp and otherwise N * log N, where N is the distance between first and last.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor/operator() of the key_compare/priority_compare objects
- //! throw. Basic guarantee.
- template<class Iterator>
- treap_impl( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, v_traits), prio_base(pcmp)
- {
- if(unique)
- this->insert_unique(b, e);
- else
- this->insert_equal(b, e);
- }
-
- //! @copydoc ::boost::intrusive::bstree::bstree(bstree &&)
- treap_impl(BOOST_RV_REF(treap_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- , prio_base(::boost::move(x.priv_pcomp()))
- {}
-
- //! @copydoc ::boost::intrusive::bstree::operator=(bstree &&)
- treap_impl& operator=(BOOST_RV_REF(treap_impl) x)
- { this->swap(x); return *this; }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::~bstree()
- ~treap_impl();
-
- //! @copydoc ::boost::intrusive::bstree::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::bstree::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::bstree::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::bstree::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::bstree::cend()const
- const_iterator cend() const;
- #endif
-
- //! <b>Effects</b>: Returns an iterator pointing to the highest priority object of the treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator top()
- { return this->tree_type::root(); }
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator top() const
- { return this->ctop(); }
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the highest priority object of the treap..
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator ctop() const
- { return this->tree_type::root(); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::bstree::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::bstree::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::bstree::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::bstree::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::bstree::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::bstree::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::bstree::croot()const
- const_iterator croot() const;
-
- #endif
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the highest priority object of the
- //! reversed treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- reverse_iterator rtop()
- { return reverse_iterator(this->top()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority objec
- //! of the reversed treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator rtop() const
- { return const_reverse_iterator(this->top()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the highest priority object
- //! of the reversed treap.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_reverse_iterator crtop() const
- { return const_reverse_iterator(this->top()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(iterator)
- static treap_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_end_iterator(const_iterator)
- static const treap_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(iterator)
- static treap_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::container_from_iterator(const_iterator)
- static const treap_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::bstree::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::bstree::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::bstree::size()const
- size_type size() const;
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Returns the priority_compare object used by the container.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If priority_compare copy-constructor throws.
- priority_compare priority_comp() const
- { return this->priv_pcomp(); }
-
- //! <b>Effects</b>: Swaps the contents of two treaps.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the comparison functor's swap call throws.
- void swap(treap_impl& other)
- {
- //This can throw
- ::boost::adl_move_swap(this->priv_pcomp(), other.priv_pcomp());
- tree_type::swap(other);
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //! Cloner should yield to nodes equivalent to the original nodes.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(const_reference )
- //! and inserts them on *this. Copies the predicate from the source container.
- //!
- //! If cloner throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
- template <class Cloner, class Disposer>
- void clone_from(const treap_impl &src, Cloner cloner, Disposer disposer)
- {
- tree_type::clone_from(src, cloner, disposer);
- this->priv_pcomp() = src.priv_pcomp();
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //! Cloner should yield to nodes equivalent to the original nodes.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(reference)
- //! and inserts them on *this. Copies the predicate from the source container.
- //!
- //! If cloner throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner throws or predicate copy assignment throws. Basic guarantee.
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_impl) src, Cloner cloner, Disposer disposer)
- {
- tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer);
- this->priv_pcomp() = ::boost::move(src.priv_pcomp());
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts value into the container before the upper bound.
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_equal(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- iterator ret
- ( node_algorithms::insert_equal_upper_bound
- ( this->tree_type::header_ptr()
- , to_insert
- , this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()))
- , this->priv_value_traits_ptr());
- this->tree_type::sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: value must be an lvalue, and "hint" must be
- //! a valid iterator.
- //!
- //! <b>Effects</b>: Inserts x into the container, using "hint" as a hint to
- //! where it will be inserted. If "hint" is the upper_bound
- //! the insertion takes constant time (two comparisons in the worst case)
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it is amortized
- //! constant time if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_equal(const_iterator hint, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- iterator ret
- (node_algorithms::insert_equal
- ( this->tree_type::header_ptr()
- , hint.pointed_node()
- , to_insert
- , this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()))
- , this->priv_value_traits_ptr());
- this->tree_type::sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Inserts a each element of a range into the container
- //! before the upper bound of the key of each element.
- //!
- //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
- //! size of the range. However, it is linear in N if the range is already sorted
- //! by key_comp().
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- template<class Iterator>
- void insert_equal(Iterator b, Iterator e)
- {
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_equal(iend, *b);
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts value into the container if the value
- //! is not already present.
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- std::pair<iterator, bool> insert_unique(reference value)
- {
- insert_commit_data commit_data;
- std::pair<iterator, bool> ret = this->insert_unique_check(key_of_value()(value), commit_data);
- if(!ret.second)
- return ret;
- return std::pair<iterator, bool> (this->insert_unique_commit(value, commit_data), true);
- }
-
- //! <b>Requires</b>: value must be an lvalue, and "hint" must be
- //! a valid iterator
- //!
- //! <b>Effects</b>: Tries to insert x into the container, using "hint" as a hint
- //! to where it will be inserted.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it is amortized
- //! constant time (two comparisons in the worst case)
- //! if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_unique(const_iterator hint, reference value)
- {
- insert_commit_data commit_data;
- std::pair<iterator, bool> ret = this->insert_unique_check(hint, key_of_value()(value), commit_data);
- if(!ret.second)
- return ret.first;
- return this->insert_unique_commit(value, commit_data);
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Tries to insert each element of a range into the container.
- //!
- //! <b>Complexity</b>: Insert range is in general O(N * log(N)), where N is the
- //! size of the range. However, it is linear in N if the range is already sorted
- //! by key_comp().
- //!
- //! <b>Throws</b>: If the internal key_compare or priority_compare functions throw.
- //! Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- template<class Iterator>
- void insert_unique(Iterator b, Iterator e)
- {
- if(this->empty()){
- iterator iend(this->end());
- for (; b != e; ++b)
- this->insert_unique(iend, *b);
- }
- else{
- for (; b != e; ++b)
- this->insert_unique(*b);
- }
- }
-
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If the comparison or predicate functions throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the value_type and this function offers the possibility to use that
- //! part to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the container.
- std::pair<iterator, bool> insert_unique_check
- ( const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(key, this->key_comp(), this->priv_pcomp(), commit_data); }
-
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself, using "hint"
- //! as a hint to where it will be inserted.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it's amortized
- //! constant time if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the comparison or predicate functions throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! constructing that is used to impose the order is much cheaper to construct
- //! than the value_type and this function offers the possibility to use that key
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time. This can give a total
- //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the container.
- std::pair<iterator, bool> insert_unique_check
- ( const_iterator hint, const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(hint, key, this->key_comp(), this->priv_pcomp(), commit_data); }
-
- //! <b>Requires</b>: comp must be a comparison function that induces
- //! the same strict weak ordering as key_compare.
- //! key_value_pcomp must be a comparison function that induces
- //! the same strict weak ordering as priority_compare. The difference is that
- //! key_value_pcomp and comp compare an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If the comp or key_value_pcomp
- //! ordering functions throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the value_type and this function offers the possibility to use that
- //! part to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the container.
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- BOOST_INTRUSIVE_DOC1ST(std::pair<iterator BOOST_INTRUSIVE_I bool>
- , typename detail::disable_if_convertible
- <KeyType BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I
- std::pair<iterator BOOST_INTRUSIVE_I bool> >::type)
- insert_unique_check
- ( const KeyType &key, KeyTypeKeyCompare comp
- , KeyValuePrioCompare key_value_pcomp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> const ret =
- (node_algorithms::insert_unique_check
- ( this->tree_type::header_ptr(), key
- , this->key_node_comp(comp), this->key_node_prio_comp(key_value_pcomp), commit_data));
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-
- //! <b>Requires</b>: comp must be a comparison function that induces
- //! the same strict weak ordering as key_compare.
- //! key_value_pcomp must be a comparison function that induces
- //! the same strict weak ordering as priority_compare. The difference is that
- //! key_value_pcomp and comp compare an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the container, using
- //! a user provided key instead of the value itself, using "hint"
- //! as a hint to where it will be inserted.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it's amortized
- //! constant time if t is inserted immediately before hint.
- //!
- //! <b>Throws</b>: If the comp or key_value_pcomp
- //! ordering functions throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! constructing that is used to impose the order is much cheaper to construct
- //! than the value_type and this function offers the possibility to use that key
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time. This can give a total
- //! constant-time complexity to the insertion: check(O(1)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the container.
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- std::pair<iterator, bool> insert_unique_check
- ( const_iterator hint, const KeyType &key
- , KeyTypeKeyCompare comp
- , KeyValuePrioCompare key_value_pcomp
- , insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> const ret =
- (node_algorithms::insert_unique_check
- ( this->tree_type::header_ptr(), hint.pointed_node(), key
- , this->key_node_comp(comp), this->key_node_prio_comp(key_value_pcomp), commit_data));
- return std::pair<iterator, bool>(iterator(ret.first, this->priv_value_traits_ptr()), ret.second);
- }
-
- //! <b>Requires</b>: value must be an lvalue of type value_type. commit_data
- //! must have been obtained from a previous call to "insert_check".
- //! No objects should have been inserted or erased from the container between
- //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
- //!
- //! <b>Effects</b>: Inserts the value in the avl_set using the information obtained
- //! from the "commit_data" that a previous "insert_check" filled.
- //!
- //! <b>Returns</b>: An iterator to the newly inserted object.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Notes</b>: This function has only sense if a "insert_check" has been
- //! previously executed to fill "commit_data". No value should be inserted or
- //! erased between the "insert_check" and "insert_commit" calls.
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- node_algorithms::insert_unique_commit(this->tree_type::header_ptr(), to_insert, commit_data);
- this->tree_type::sz_traits().increment();
- return iterator(to_insert, this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: value must be an lvalue, "pos" must be
- //! a valid iterator (or end) and must be the succesor of value
- //! once inserted according to the predicate
- //!
- //! <b>Effects</b>: Inserts x into the container before "pos".
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: This function does not check preconditions so if "pos" is not
- //! the successor of "value" container ordering invariant will be broken.
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- iterator insert_before(const_iterator pos, reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- iterator ret
- ( node_algorithms::insert_before
- ( this->tree_type::header_ptr()
- , pos.pointed_node()
- , to_insert
- , this->key_node_prio_comp(this->priv_pcomp())
- )
- , this->priv_value_traits_ptr());
- this->tree_type::sz_traits().increment();
- return ret;
- }
-
- //! <b>Requires</b>: value must be an lvalue, and it must be no less
- //! than the greatest inserted key
- //!
- //! <b>Effects</b>: Inserts x into the container in the last position.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: This function does not check preconditions so if value is
- //! less than the greatest inserted key container ordering invariant will be broken.
- //! This function is slightly more efficient than using "insert_before".
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- void push_back(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- node_algorithms::push_back
- (this->tree_type::header_ptr(), to_insert, this->key_node_prio_comp(this->priv_pcomp()));
- this->tree_type::sz_traits().increment();
- }
-
- //! <b>Requires</b>: value must be an lvalue, and it must be no greater
- //! than the minimum inserted key
- //!
- //! <b>Effects</b>: Inserts x into the container in the first position.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: If the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: This function does not check preconditions so if value is
- //! greater than the minimum inserted key container ordering invariant will be broken.
- //! This function is slightly more efficient than using "insert_before".
- //! This is a low-level function to be used only for performance reasons
- //! by advanced users.
- void push_front(reference value)
- {
- node_ptr to_insert(this->get_value_traits().to_node_ptr(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(to_insert));
- node_algorithms::push_front
- (this->tree_type::header_ptr(), to_insert, this->key_node_prio_comp(this->priv_pcomp()));
- this->tree_type::sz_traits().increment();
- }
-
- //! <b>Effects</b>: Erases the element pointed to by i.
- //!
- //! <b>Complexity</b>: Average complexity for erase element is constant time.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- iterator erase(const_iterator i)
- {
- const_iterator ret(i);
- ++ret;
- node_ptr to_erase(i.pointed_node());
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(to_erase));
- node_algorithms::erase
- (this->tree_type::header_ptr(), to_erase, this->key_node_prio_comp(this->priv_pcomp()));
- this->tree_type::sz_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- return ret.unconst();
- }
-
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //!
- //! <b>Complexity</b>: Average complexity for erase range is at most
- //! O(log(size() + N)), where N is the number of elements in the range.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- iterator erase(const_iterator b, const_iterator e)
- { size_type n; return private_erase(b, e, n); }
-
- //! <b>Effects</b>: Erases all the elements with the given value.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- size_type erase(const key_type &key)
- { return this->erase(key, this->key_comp()); }
-
- //! <b>Effects</b>: Erases all the elements with the given key.
- //! according to the comparison functor "comp".
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws.
- //! Equivalent guarantee to <i>while(beg != end) erase(beg++);</i>
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class KeyType, class KeyTypeKeyCompare>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase(const KeyType& key, KeyTypeKeyCompare comp)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- private_erase(p.first, p.second, n);
- return n;
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the element pointed to by i.
- //! Disposer::operator()(pointer) is called for the removed element.
- //!
- //! <b>Complexity</b>: Average complexity for erase element is constant time.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer)
- {
- node_ptr to_erase(i.pointed_node());
- iterator ret(this->erase(i));
- disposer(this->get_value_traits().to_value_ptr(to_erase));
- return ret;
- }
-
- #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- template<class Disposer>
- iterator erase_and_dispose(iterator i, Disposer disposer)
- { return this->erase_and_dispose(const_iterator(i), disposer); }
- #endif
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Complexity</b>: Average complexity for erase range is at most
- //! O(log(size() + N)), where N is the number of elements in the range.
- //!
- //! <b>Throws</b>: if the internal priority_compare function throws. Strong guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
- { size_type n; return private_erase(b, e, n, disposer); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements with the given value.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the priority_compare function throws then weak guarantee and heap invariants are broken.
- //! The safest thing would be to clear or destroy the container.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key);
- size_type n;
- private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements with the given key.
- //! according to the comparison functor "comp".
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: O(log(size() + N).
- //!
- //! <b>Throws</b>: if the priority_compare function throws then weak guarantee and heap invariants are broken.
- //! The safest thing would be to clear or destroy the container.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- BOOST_INTRUSIVE_DOC1ST(size_type
- , typename detail::disable_if_convertible<KeyTypeKeyCompare BOOST_INTRUSIVE_I const_iterator BOOST_INTRUSIVE_I size_type>::type)
- erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer)
- {
- std::pair<iterator,iterator> p = this->equal_range(key, comp);
- size_type n;
- private_erase(p.first, p.second, n, disposer);
- return n;
- }
-
- //! <b>Effects</b>: Erases all of the elements.
- //!
- //! <b>Complexity</b>: Linear to the number of elements on the container.
- //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- void clear()
- { tree_type::clear(); }
-
- //! <b>Effects</b>: Erases all of the elements calling disposer(p) for
- //! each node to be erased.
- //! <b>Complexity</b>: Average complexity for is at most O(log(size() + N)),
- //! where N is the number of elements in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. Calls N times to disposer functor.
- template<class Disposer>
- void clear_and_dispose(Disposer disposer)
- {
- node_algorithms::clear_and_dispose(this->tree_type::header_ptr()
- , detail::node_disposer<Disposer, value_traits, TreapAlgorithms>(disposer, &this->get_value_traits()));
- node_algorithms::init_header(this->tree_type::header_ptr());
- this->tree_type::sz_traits().set_size(0);
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::bstree::merge_unique
- template<class T, class ...Options2> void merge_unique(sgtree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_unique(treap_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
-
- if( node_algorithms::transfer_unique
- ( this->header_ptr(), this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p) ){
- this->sz_traits().increment();
- source.sz_traits().decrement();
- }
- }
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::bstree::merge_equal(bstree<T, Options2...>&)
- template<class T, class ...Options2> void merge_equal(sgtree<T, Options2...> &);
- #else
- template<class Compare2>
- void merge_equal(treap_impl
- <ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- #endif
- {
- node_ptr it (node_algorithms::begin_node(source.header_ptr()))
- , itend(node_algorithms::end_node (source.header_ptr()));
-
- while(it != itend){
- node_ptr const p(it);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || !node_algorithms::unique(p));
- it = node_algorithms::next_node(it);
- node_algorithms::transfer_equal
- ( this->header_ptr(), this->key_node_comp(this->key_comp())
- , this->key_node_prio_comp(this->priv_pcomp()), source.header_ptr(), p);
- this->sz_traits().increment();
- source.sz_traits().decrement();
- }
- }
-
- //! @copydoc ::boost::intrusive::bstree::check(ExtraChecker)const
- template <class ExtraChecker>
- void check(ExtraChecker extra_checker) const
- {
- typedef detail::key_nodeptr_comp<priority_compare, value_traits, key_of_value> nodeptr_prio_comp_t;
- tree_type::check(detail::treap_node_extra_checker
- <ValueTraits, nodeptr_prio_comp_t, ExtraChecker>
- (this->key_node_prio_comp(this->priv_pcomp()), extra_checker));
- }
-
- //! @copydoc ::boost::intrusive::bstree::check()const
- void check() const
- { check(detail::empty_node_checker<ValueTraits>()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::bstree::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::bstree::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::bstree::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::bstree::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::bstree::remove_node
- void remove_node(reference value);
-
- friend bool operator< (const treap_impl &x, const treap_impl &y);
-
- friend bool operator==(const treap_impl &x, const treap_impl &y);
-
- friend bool operator!= (const treap_impl &x, const treap_impl &y);
-
- friend bool operator>(const treap_impl &x, const treap_impl &y);
-
- friend bool operator<=(const treap_impl &x, const treap_impl &y);
-
- friend bool operator>=(const treap_impl &x, const treap_impl &y);
-
- friend void swap(treap_impl &x, treap_impl &y);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- /// @cond
- private:
- template<class Disposer>
- iterator private_erase(const_iterator b, const_iterator e, size_type &n, Disposer disposer)
- {
- for(n = 0; b != e; ++n)
- this->erase_and_dispose(b++, disposer);
- return b.unconst();
- }
-
- iterator private_erase(const_iterator b, const_iterator e, size_type &n)
- {
- for(n = 0; b != e; ++n)
- this->erase(b++);
- return b.unconst();
- }
- /// @endcond
-};
-
-
-//! Helper metafunction to define a \c treap that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_treap
-{
- typedef typename pack_options
- < treap_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef treap_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::priority
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class treap
- : public make_treap<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_treap
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::priority_compare priority_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::reverse_iterator reverse_iterator;
- typedef typename Base::const_reverse_iterator const_reverse_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
- treap()
- : Base()
- {}
-
- explicit treap( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(cmp, pcmp, v_traits)
- {}
-
- template<class Iterator>
- treap( bool unique, Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(unique, b, e, cmp, pcmp, v_traits)
- {}
-
- treap(BOOST_RV_REF(treap) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- treap& operator=(BOOST_RV_REF(treap) x)
- { return static_cast<treap&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const treap &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static treap &container_from_end_iterator(iterator end_iterator)
- { return static_cast<treap &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const treap &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const treap &>(Base::container_from_end_iterator(end_iterator)); }
-
- static treap &container_from_iterator(iterator it)
- { return static_cast<treap &>(Base::container_from_iterator(it)); }
-
- static const treap &container_from_iterator(const_iterator it)
- { return static_cast<const treap &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TREAP_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/treap_algorithms.hpp b/contrib/restricted/boost/boost/intrusive/treap_algorithms.hpp
deleted file mode 100644
index b1a82b3d0f6..00000000000
--- a/contrib/restricted/boost/boost/intrusive/treap_algorithms.hpp
+++ /dev/null
@@ -1,699 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2014.
-//
-// 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_TREAP_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <cstddef>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/intrusive/bstree_algorithms.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-namespace detail
-{
-
-template<class ValueTraits, class NodePtrPrioCompare, class ExtraChecker>
-struct treap_node_extra_checker
- : public ExtraChecker
-{
- typedef ExtraChecker base_checker_t;
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::const_node_ptr const_node_ptr;
-
- typedef typename base_checker_t::return_type return_type;
-
- treap_node_extra_checker(const NodePtrPrioCompare& prio_comp, ExtraChecker extra_checker)
- : base_checker_t(extra_checker), prio_comp_(prio_comp)
- {}
-
- void operator () (const const_node_ptr& p,
- const return_type& check_return_left, const return_type& check_return_right,
- return_type& check_return)
- {
- if (node_traits::get_left(p))
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_left(p), p));
- if (node_traits::get_right(p))
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_right(p), p));
- base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
- }
-
- const NodePtrPrioCompare prio_comp_;
-};
-
-} // namespace detail
-
-#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-//! treap_algorithms provides basic algorithms to manipulate
-//! nodes forming a treap.
-//!
-//! (1) the header node is maintained with links not only to the root
-//! but also to the leftmost node of the tree, to enable constant time
-//! begin(), and to the rightmost node of the tree, to enable linear time
-//! performance when used with the generic set algorithms (set_union,
-//! etc.);
-//!
-//! (2) when a node being deleted has two children its successor node is
-//! relinked into its place, rather than copied, so that the only
-//! pointers invalidated are those referring to the deleted node.
-//!
-//! treap_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the treap
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
-//!
-//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
-//!
-//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
-template<class NodeTraits>
-class treap_algorithms
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_algorithms<NodeTraits>
- #endif
-{
- public:
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- /// @cond
- private:
-
- typedef bstree_algorithms<NodeTraits> bstree_algo;
-
- class rerotate_on_destroy
- {
- rerotate_on_destroy& operator=(const rerotate_on_destroy&);
-
- public:
- rerotate_on_destroy(const node_ptr & header, const node_ptr & p, std::size_t &n)
- : header_(header), p_(p), n_(n), remove_it_(true)
- {}
-
- ~rerotate_on_destroy()
- {
- if(remove_it_){
- rotate_up_n(header_, p_, n_);
- }
- }
-
- void release()
- { remove_it_ = false; }
-
- const node_ptr header_;
- const node_ptr p_;
- std::size_t &n_;
- bool remove_it_;
- };
-
- static void rotate_up_n(const node_ptr header, const node_ptr p, std::size_t n)
- {
- node_ptr p_parent(NodeTraits::get_parent(p));
- node_ptr p_grandparent(NodeTraits::get_parent(p_parent));
- while(n--){
- if(p == NodeTraits::get_left(p_parent)){ //p is left child
- bstree_algo::rotate_right(p_parent, p, p_grandparent, header);
- }
- else{ //p is right child
- bstree_algo::rotate_left(p_parent, p, p_grandparent, header);
- }
- p_parent = p_grandparent;
- p_grandparent = NodeTraits::get_parent(p_parent);
- }
- }
-
- /// @endcond
-
- public:
- //! This type is the information that will be
- //! filled by insert_unique_check
- struct insert_commit_data
- /// @cond
- : public bstree_algo::insert_commit_data
- /// @endcond
- {
- /// @cond
- std::size_t rotations;
- /// @endcond
- };
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
- static node_ptr get_header(const const_node_ptr & n);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
- static node_ptr begin_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
- static node_ptr end_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
- static void swap_tree(const node_ptr & header1, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & node2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&,const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & header1, const node_ptr & node2, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & header, const node_ptr & new_node);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(const node_ptr&)
- template<class NodePtrPriorityCompare>
- static void unlink(const node_ptr & node, NodePtrPriorityCompare pcomp)
- {
- node_ptr x = NodeTraits::get_parent(node);
- if(x){
- while(!bstree_algo::is_header(x))
- x = NodeTraits::get_parent(x);
- erase(x, node, pcomp);
- }
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
- static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
- static bool unique(const const_node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
- static std::size_t size(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
- static node_ptr next_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
- static node_ptr prev_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init(const node_ptr&)
- static void init(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(const node_ptr&)
- static void init_header(const node_ptr & header);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::erase(const node_ptr&,const node_ptr&)
- template<class NodePtrPriorityCompare>
- static node_ptr erase(const node_ptr & header, const node_ptr & z, NodePtrPriorityCompare pcomp)
- {
- rebalance_for_erasure(header, z, pcomp);
- bstree_algo::erase(header, z);
- return z;
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- static void clone
- (const const_node_ptr & source_header, const node_ptr & target_header, Cloner cloner, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
- template<class Disposer>
- static void clear_and_dispose(const node_ptr & header, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
- , bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Requires</b>: "h" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
- //! according to "comp" and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throw or "pcomp" throw.
- template<class NodePtrCompare, class NodePtrPriorityCompare>
- static node_ptr insert_equal_upper_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_upper_bound_check(h, new_node, comp, commit_data);
- rebalance_check_and_commit(h, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "h" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
- //! according to "comp" and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class NodePtrCompare, class NodePtrPriorityCompare>
- static node_ptr insert_equal_lower_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_lower_bound_check(h, new_node, comp, commit_data);
- rebalance_check_and_commit(h, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
- //! the "header"'s tree.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
- //! where it will be inserted. If "hint" is the upper_bound
- //! the insertion takes constant time (two comparisons in the worst case).
- //! Rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it is amortized
- //! constant time if new_node is inserted immediately before "hint".
- //!
- //! <b>Throws</b>: If "comp" throw or "pcomp" throw.
- template<class NodePtrCompare, class NodePtrPriorityCompare>
- static node_ptr insert_equal
- (const node_ptr & h, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_check(h, hint, new_node, comp, commit_data);
- rebalance_check_and_commit(h, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "pos" must be a valid node of the tree (including header end) node.
- //! "pos" must be a node pointing to the successor to "new_node"
- //! once inserted according to the order of already inserted nodes. This function does not
- //! check "pos" and this precondition must be guaranteed by the caller.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before "pos"
- //! and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
- //!
- //! <b>Note</b>: If "pos" is not the successor of the newly inserted "new_node"
- //! tree invariants might be broken.
- template<class NodePtrPriorityCompare>
- static node_ptr insert_before
- (const node_ptr & header, const node_ptr & pos, const node_ptr & new_node, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_before_check(header, pos, commit_data);
- rebalance_check_and_commit(header, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "new_node" must be, according to the used ordering no less than the
- //! greatest inserted key.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts x into the tree in the last position
- //! and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
- //!
- //! <b>Note</b>: If "new_node" is less than the greatest inserted key
- //! tree invariants are broken. This function is slightly faster than
- //! using "insert_before".
- template<class NodePtrPriorityCompare>
- static void push_back(const node_ptr & header, const node_ptr & new_node, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::push_back_check(header, commit_data);
- rebalance_check_and_commit(header, new_node, pcomp, commit_data);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "new_node" must be, according to the used ordering, no greater than the
- //! lowest inserted key.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts x into the tree in the first position
- //! and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
- //!
- //! <b>Note</b>: If "new_node" is greater than the lowest inserted key
- //! tree invariants are broken. This function is slightly faster than
- //! using "insert_before".
- template<class NodePtrPriorityCompare>
- static void push_front(const node_ptr & header, const node_ptr & new_node, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::push_front_check(header, commit_data);
- rebalance_check_and_commit(header, new_node, pcomp, commit_data);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares KeyType with a node_ptr.
- //!
- //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
- //! tree according to "comp" and obtains the needed information to realize
- //! a constant-time node insertion if there is no equivalent node.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing a node_ptr to the already present node
- //! and false. If there is not equivalent key can be inserted returns true
- //! in the returned pair's boolean and fills "commit_data" that is meant to
- //! be used with the "insert_commit" function to achieve a constant-time
- //! insertion function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a node is expensive and the user does not want to have two equivalent nodes
- //! in the tree: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the node and this function offers the possibility to use that part
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the node and use
- //! "insert_commit" to insert the node in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
- //! if no more objects are inserted or erased from the set.
- template<class KeyType, class KeyNodePtrCompare, class KeyNodePtrPrioCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp
- ,insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- bstree_algo::insert_unique_check(header, key, comp, commit_data);
- if(ret.second)
- rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations);
- return ret;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares KeyType with a node_ptr.
- //! "hint" is node from the "header"'s tree.
- //!
- //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
- //! tree according to "comp" using "hint" as a hint to where it should be
- //! inserted and obtains the needed information to realize
- //! a constant-time node insertion if there is no equivalent node.
- //! If "hint" is the upper_bound the function has constant time
- //! complexity (two comparisons in the worst case).
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing a node_ptr to the already present node
- //! and false. If there is not equivalent key can be inserted returns true
- //! in the returned pair's boolean and fills "commit_data" that is meant to
- //! be used with the "insert_commit" function to achieve a constant-time
- //! insertion function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic, but it is
- //! amortized constant time if new_node should be inserted immediately before "hint".
- //!
- //! <b>Throws</b>: If "comp" throws.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a node is expensive and the user does not want to have two equivalent nodes
- //! in the tree: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the node and this function offers the possibility to use that part
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the node and use
- //! "insert_commit" to insert the node in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
- //! if no more objects are inserted or erased from the set.
- template<class KeyType, class KeyNodePtrCompare, class KeyNodePtrPrioCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const node_ptr & hint, const KeyType &key
- ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- bstree_algo::insert_unique_check(header, hint, key, comp, commit_data);
- if(ret.second)
- rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations);
- return ret;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "commit_data" must have been obtained from a previous call to
- //! "insert_unique_check". No objects should have been inserted or erased
- //! from the set between the "insert_unique_check" that filled "commit_data"
- //! and the call to "insert_commit".
- //!
- //!
- //! <b>Effects</b>: Inserts new_node in the set using the information obtained
- //! from the "commit_data" that a previous "insert_check" filled.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Notes</b>: This function has only sense if a "insert_unique_check" has been
- //! previously executed to fill "commit_data". No value should be inserted or
- //! erased between the "insert_check" and "insert_commit" calls.
- static void insert_unique_commit
- (const node_ptr & header, const node_ptr & new_node, const insert_commit_data &commit_data)
- {
- bstree_algo::insert_unique_commit(header, new_node, commit_data);
- rotate_up_n(header, new_node, commit_data.rotations);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
- template<class NodePtrCompare, class KeyNodePtrPrioCompare>
- static bool transfer_unique
- (const node_ptr & header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, const node_ptr &header2, const node_ptr & z)
- {
- insert_commit_data commit_data;
- bool const transferable = insert_unique_check(header1, z, comp, pcomp, commit_data).second;
- if(transferable){
- erase(header2, z, pcomp);
- insert_unique_commit(header1, z, commit_data);
- }
- return transferable;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
- template<class NodePtrCompare, class KeyNodePtrPrioCompare>
- static void transfer_equal
- (const node_ptr & header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, const node_ptr &header2, const node_ptr & z)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_upper_bound_check(header1, z, comp, commit_data);
- rebalance_after_insertion_check(header1, commit_data.node, z, pcomp, commit_data.rotations);
- rebalance_for_erasure(header2, z, pcomp);
- bstree_algo::erase(header2, z);
- bstree_algo::insert_unique_commit(header1, z, commit_data);
- rotate_up_n(header1, z, commit_data.rotations);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
- static bool is_header(const const_node_ptr & p);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- /// @cond
- private:
-
- template<class NodePtrPriorityCompare>
- static void rebalance_for_erasure(const node_ptr & header, const node_ptr & z, NodePtrPriorityCompare pcomp)
- {
- std::size_t n = 0;
- rerotate_on_destroy rb(header, z, n);
-
- node_ptr z_left = NodeTraits::get_left(z);
- node_ptr z_right = NodeTraits::get_right(z);
- while(z_left || z_right){
- const node_ptr z_parent(NodeTraits::get_parent(z));
- if(!z_right || (z_left && pcomp(z_left, z_right))){
- bstree_algo::rotate_right(z, z_left, z_parent, header);
- }
- else{
- bstree_algo::rotate_left(z, z_right, z_parent, header);
- }
- ++n;
- z_left = NodeTraits::get_left(z);
- z_right = NodeTraits::get_right(z);
- }
- rb.release();
- }
-
- template<class NodePtrPriorityCompare>
- static void rebalance_check_and_commit
- (const node_ptr & h, const node_ptr & new_node, NodePtrPriorityCompare pcomp, insert_commit_data &commit_data)
- {
- rebalance_after_insertion_check(h, commit_data.node, new_node, pcomp, commit_data.rotations);
- //No-throw
- bstree_algo::insert_unique_commit(h, new_node, commit_data);
- rotate_up_n(h, new_node, commit_data.rotations);
- }
-
- template<class Key, class KeyNodePriorityCompare>
- static void rebalance_after_insertion_check
- (const const_node_ptr &header, const const_node_ptr & up, const Key &k
- , KeyNodePriorityCompare pcomp, std::size_t &num_rotations)
- {
- const_node_ptr upnode(up);
- //First check rotations since pcomp can throw
- num_rotations = 0;
- std::size_t n = 0;
- while(upnode != header && pcomp(k, upnode)){
- ++n;
- upnode = NodeTraits::get_parent(upnode);
- }
- num_rotations = n;
- }
-
- template<class NodePtrPriorityCompare>
- static bool check_invariant(const const_node_ptr & header, NodePtrPriorityCompare pcomp)
- {
- node_ptr beg = begin_node(header);
- node_ptr end = end_node(header);
-
- while(beg != end){
- node_ptr p = NodeTraits::get_parent(beg);
- if(p != header){
- if(pcomp(beg, p))
- return false;
- }
- beg = next_node(beg);
- }
- return true;
- }
-
- /// @endcond
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<TreapAlgorithms, NodeTraits>
-{
- typedef treap_algorithms<NodeTraits> type;
-};
-
-template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct get_node_checker<TreapAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/treap_set.hpp b/contrib/restricted/boost/boost/intrusive/treap_set.hpp
deleted file mode 100644
index bf162badf0d..00000000000
--- a/contrib/restricted/boost/boost/intrusive/treap_set.hpp
+++ /dev/null
@@ -1,1106 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// 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_TREAP_SET_HPP
-#define BOOST_INTRUSIVE_TREAP_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/treap.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-class treap_multiset_impl;
-#endif
-
-//! The class template treap_set is an intrusive container, that mimics most of
-//! the interface of std::set as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>,
-//! \c compare<> and \c priority_compare<>
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class treap_set_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- public:
- typedef treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::priority_compare priority_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
-
- public:
- //! @copydoc ::boost::intrusive::treap::treap()
- treap_set_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(const key_compare &,const priority_compare &,const value_traits &)
- explicit treap_set_impl( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, pcmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(bool,Iterator,Iterator,const key_compare &,const priority_compare &,const value_traits &)
- template<class Iterator>
- treap_set_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(true, b, e, cmp, pcmp, v_traits)
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_set_impl(BOOST_RV_REF(treap_set_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_set_impl& operator=(BOOST_RV_REF(treap_set_impl) x)
- { return static_cast<treap_set_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::~treap()
- ~treap_set_impl();
-
- //! @copydoc ::boost::intrusive::treap::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::treap::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::treap::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::treap::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::treap::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::treap::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::treap::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::treap::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::treap::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::treap::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::treap::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::treap::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
- static treap_set_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
- static const treap_set_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
- static treap_set_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
- static const treap_set_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::treap::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::treap::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::treap::swap
- void swap(treap_set_impl& other);
-
- //! @copydoc ::boost::intrusive::treap::clone_from(const treap&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const treap_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif
-
- //! @copydoc ::boost::intrusive::treap::clone_from(treap&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_set_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::intrusive::treap::top()
- iterator top();
-
- //! @copydoc ::boost::intrusive::treap::top()const
- const_iterator top() const;
-
- //! @copydoc ::boost::intrusive::treap::ctop()const
- const_iterator ctop() const;
-
- //! @copydoc ::boost::intrusive::treap::rtop()
- reverse_iterator rtop();
-
- //! @copydoc ::boost::intrusive::treap::rtop()const
- const_reverse_iterator rtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop()const
- const_reverse_iterator crtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop() const
- priority_compare priority_comp() const;
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::insert_unique(reference)
- std::pair<iterator, bool> insert(reference value)
- { return tree_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_unique(hint, value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check( const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const_iterator,const key_type&,insert_commit_data&)
- std::pair<iterator, bool> insert_check
- ( const_iterator hint, const key_type &key, insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const KeyType&,KeyTypeKeyCompare,KeyValuePrioCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- std::pair<iterator, bool> insert_check
- ( const KeyType &key, KeyTypeKeyCompare comp, KeyValuePrioCompare key_value_pcomp
- , insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(key, comp, key_value_pcomp, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_check(const_iterator,const KeyType&,KeyTypeKeyCompare,KeyValuePrioCompare,insert_commit_data&)
- template<class KeyType, class KeyTypeKeyCompare, class KeyValuePrioCompare>
- std::pair<iterator, bool> insert_check
- ( const_iterator hint, const KeyType &key
- , KeyTypeKeyCompare comp, KeyValuePrioCompare key_value_pcomp
- , insert_commit_data &commit_data)
- { return tree_type::insert_unique_check(hint, key, comp, key_value_pcomp, commit_data); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::treap::insert_unique_commit
- iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return tree_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::treap::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::treap::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::count(const key_type &)const
- size_type count(const key_type &key) const
- { return static_cast<size_type>(this->tree_type::find(key) != this->tree_type::cend()); }
-
- //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const
- { return static_cast<size_type>(this->tree_type::find(key, comp) != this->tree_type::cend()); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp)
- { return this->tree_type::equal_range(key, comp); }
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->tree_type::lower_bound_range(key); }
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const
- { return this->tree_type::equal_range(key, comp); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::treap::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::treap::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::treap::remove_node
- void remove_node(reference value);
-
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_set<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_multiset<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- template<class Compare2>
- void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_unique(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-
-//! Helper metafunction to define a \c treap_set that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_treap_set
-{
- typedef typename pack_options
- < treap_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef treap_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::priority
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class treap_set
- : public make_treap_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_treap_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_set)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::priority_compare priority_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- treap_set()
- : Base()
- {}
-
- explicit treap_set( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(cmp, pcmp, v_traits)
- {}
-
- template<class Iterator>
- treap_set( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, pcmp, v_traits)
- {}
-
- treap_set(BOOST_RV_REF(treap_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- treap_set& operator=(BOOST_RV_REF(treap_set) x)
- { return static_cast<treap_set &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const treap_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static treap_set &container_from_end_iterator(iterator end_iterator)
- { return static_cast<treap_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const treap_set &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const treap_set &>(Base::container_from_end_iterator(end_iterator)); }
-
- static treap_set &container_from_iterator(iterator it)
- { return static_cast<treap_set &>(Base::container_from_iterator(it)); }
-
- static const treap_set &container_from_iterator(const_iterator it)
- { return static_cast<const treap_set &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-//! The class template treap_multiset is an intrusive container, that mimics most of
-//! the interface of std::treap_multiset as described in the C++ standard.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>,
-//! \c compare<> and \c priority_compare<>
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyComp, class VoidOrPrioComp, class SizeType, bool ConstantTimeSize, typename HeaderHolder>
-#endif
-class treap_multiset_impl
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder>
-#endif
-{
- /// @cond
- typedef treap_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyComp, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> tree_type;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset_impl)
-
- typedef tree_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::value_compare value_compare;
- typedef typename implementation_defined::key_compare key_compare;
- typedef typename implementation_defined::priority_compare priority_compare;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::reverse_iterator reverse_iterator;
- typedef typename implementation_defined::const_reverse_iterator const_reverse_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::node_traits node_traits;
- 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;
-
- static const bool constant_time_size = implementation_defined::constant_time_size;
-
- public:
-
- //! @copydoc ::boost::intrusive::treap::treap()
- treap_multiset_impl()
- : tree_type()
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(const key_compare &,const priority_compare &,const value_traits &)
- explicit treap_multiset_impl( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(cmp, pcmp, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::treap::treap(bool,Iterator,Iterator,const key_compare &,const priority_compare &,const value_traits &)
- template<class Iterator>
- treap_multiset_impl( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : tree_type(false, b, e, cmp, pcmp, v_traits)
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_multiset_impl(BOOST_RV_REF(treap_multiset_impl) x)
- : tree_type(BOOST_MOVE_BASE(tree_type, x))
- {}
-
- //! <b>Effects</b>: to-do
- //!
- treap_multiset_impl& operator=(BOOST_RV_REF(treap_multiset_impl) x)
- { return static_cast<treap_multiset_impl&>(tree_type::operator=(BOOST_MOVE_BASE(tree_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::~treap()
- ~treap_multiset_impl();
-
- //! @copydoc ::boost::intrusive::treap::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::treap::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::treap::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::treap::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::treap::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::treap::rbegin()
- reverse_iterator rbegin();
-
- //! @copydoc ::boost::intrusive::treap::rbegin()const
- const_reverse_iterator rbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::crbegin()const
- const_reverse_iterator crbegin() const;
-
- //! @copydoc ::boost::intrusive::treap::rend()
- reverse_iterator rend();
-
- //! @copydoc ::boost::intrusive::treap::rend()const
- const_reverse_iterator rend() const;
-
- //! @copydoc ::boost::intrusive::treap::crend()const
- const_reverse_iterator crend() const;
-
- //! @copydoc ::boost::intrusive::treap::root()
- iterator root();
-
- //! @copydoc ::boost::intrusive::treap::root()const
- const_iterator root() const;
-
- //! @copydoc ::boost::intrusive::treap::croot()const
- const_iterator croot() const;
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(iterator)
- static treap_multiset_impl &container_from_end_iterator(iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_end_iterator(const_iterator)
- static const treap_multiset_impl &container_from_end_iterator(const_iterator end_iterator);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(iterator)
- static treap_multiset_impl &container_from_iterator(iterator it);
-
- //! @copydoc ::boost::intrusive::treap::container_from_iterator(const_iterator)
- static const treap_multiset_impl &container_from_iterator(const_iterator it);
-
- //! @copydoc ::boost::intrusive::treap::key_comp()const
- key_compare key_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::value_comp()const
- value_compare value_comp() const;
-
- //! @copydoc ::boost::intrusive::treap::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::treap::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::treap::swap
- void swap(treap_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::treap::clone_from(const treap&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const treap_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using tree_type::clone_from;
-
- #endif
-
- //! @copydoc ::boost::intrusive::treap::clone_from(treap&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_multiset_impl) src, Cloner cloner, Disposer disposer)
- { tree_type::clone_from(BOOST_MOVE_BASE(tree_type, src), cloner, disposer); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::intrusive::treap::top()
- iterator top();
-
- //! @copydoc ::boost::intrusive::treap::top()const
- const_iterator top() const;
-
- //! @copydoc ::boost::intrusive::treap::ctop()const
- const_iterator ctop() const;
-
- //! @copydoc ::boost::intrusive::treap::rtop()
- reverse_iterator rtop();
-
- //! @copydoc ::boost::intrusive::treap::rtop()const
- const_reverse_iterator rtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop()const
- const_reverse_iterator crtop() const;
-
- //! @copydoc ::boost::intrusive::treap::crtop() const
- priority_compare priority_comp() const;
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::treap::insert_equal(reference)
- iterator insert(reference value)
- { return tree_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_equal(const_iterator,reference)
- iterator insert(const_iterator hint, reference value)
- { return tree_type::insert_equal(hint, value); }
-
- //! @copydoc ::boost::intrusive::treap::insert_equal(Iterator,Iterator)
- template<class Iterator>
- void insert(Iterator b, Iterator e)
- { tree_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::treap::insert_before
- iterator insert_before(const_iterator pos, reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_back
- void push_back(reference value);
-
- //! @copydoc ::boost::intrusive::treap::push_front
- void push_front(reference value);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator)
- iterator erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::treap::erase(const_iterator,const_iterator)
- iterator erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::treap::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::erase(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- size_type erase(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- iterator erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const key_type &, Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::erase_and_dispose(const KeyType&,KeyTypeKeyCompare,Disposer)
- template<class KeyType, class KeyTypeKeyCompare, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyTypeKeyCompare comp, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::treap::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::treap::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::count(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- size_type count(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)
- iterator lower_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const key_type &)const
- const_iterator lower_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::lower_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator lower_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)
- iterator upper_bound(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const key_type &)const
- const_iterator upper_bound(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::upper_bound(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator upper_bound(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- iterator find(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::find(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::find(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- const_iterator find(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyTypeKeyCompare comp);
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const key_type &)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::treap::equal_range(const KeyType&,KeyTypeKeyCompare)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyTypeKeyCompare comp) const;
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)
- std::pair<iterator,iterator> bounded_range
- (const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<iterator,iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const key_type &,const key_type &,bool,bool)const
- std::pair<const_iterator, const_iterator>
- bounded_range(const key_type &lower_key, const key_type &upper_key, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::bounded_range(const KeyType&,const KeyType&,KeyTypeKeyCompare,bool,bool)const
- template<class KeyType, class KeyTypeKeyCompare>
- std::pair<const_iterator, const_iterator> bounded_range
- (const KeyType& lower_key, const KeyType& upper_key, KeyTypeKeyCompare comp, bool left_closed, bool right_closed) const;
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(reference)
- static iterator s_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::s_iterator_to(const_reference)
- static const_iterator s_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::treap::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::treap::init_node(reference)
- static void init_node(reference value);
-
- //! @copydoc ::boost::intrusive::treap::unlink_leftmost_without_rebalance
- pointer unlink_leftmost_without_rebalance();
-
- //! @copydoc ::boost::intrusive::treap::replace_node
- void replace_node(iterator replace_this, reference with_this);
-
- //! @copydoc ::boost::intrusive::treap::remove_node
- void remove_node(reference value);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_multiset<T, Options2...> &source);
-
- //! @copydoc ::boost::intrusive::treap::merge_unique
- template<class ...Options2>
- void merge(treap_set<T, Options2...> &source);
-
- #else
-
- template<class Compare2>
- void merge(treap_multiset_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- template<class Compare2>
- void merge(treap_set_impl<ValueTraits, VoidOrKeyOfValue, Compare2, VoidOrPrioComp, SizeType, ConstantTimeSize, HeaderHolder> &source)
- { return tree_type::merge_equal(source); }
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-
-//! Helper metafunction to define a \c treap_multiset that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void>
-#endif
-struct make_treap_multiset
-{
- typedef typename pack_options
- < treap_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef treap_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::compare
- , typename packed_options::priority
- , typename packed_options::size_type
- , packed_options::constant_time_size
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#else
-template<class T, class ...Options>
-#endif
-class treap_multiset
- : public make_treap_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_treap_multiset
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(treap_multiset)
-
- public:
- typedef typename Base::key_compare key_compare;
- typedef typename Base::priority_compare priority_compare;
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- treap_multiset()
- : Base()
- {}
-
- explicit treap_multiset( const key_compare &cmp
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(cmp, pcmp, v_traits)
- {}
-
- template<class Iterator>
- treap_multiset( Iterator b, Iterator e
- , const key_compare &cmp = key_compare()
- , const priority_compare &pcmp = priority_compare()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, cmp, pcmp, v_traits)
- {}
-
- treap_multiset(BOOST_RV_REF(treap_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- treap_multiset& operator=(BOOST_RV_REF(treap_multiset) x)
- { return static_cast<treap_multiset &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const treap_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(treap_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static treap_multiset &container_from_end_iterator(iterator end_iterator)
- { return static_cast<treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const treap_multiset &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const treap_multiset &>(Base::container_from_end_iterator(end_iterator)); }
-
- static treap_multiset &container_from_iterator(iterator it)
- { return static_cast<treap_multiset &>(Base::container_from_iterator(it)); }
-
- static const treap_multiset &container_from_iterator(const_iterator it)
- { return static_cast<const treap_multiset &>(Base::container_from_iterator(it)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TREAP_SET_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/trivial_value_traits.hpp b/contrib/restricted/boost/boost/intrusive/trivial_value_traits.hpp
deleted file mode 100644
index 84fac665d14..00000000000
--- a/contrib/restricted/boost/boost/intrusive/trivial_value_traits.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (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_TRIVIAL_VALUE_TRAITS_HPP
-#define BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-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
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- = safe_link
- #endif
->
-struct trivial_value_traits
-{
- typedef NodeTraits node_traits;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef typename node_traits::node value_type;
- typedef node_ptr pointer;
- typedef const_node_ptr const_pointer;
- static const link_mode_type link_mode = LinkMode;
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr to_node_ptr (value_type &value)
- { return pointer_traits<node_ptr>::pointer_to(value); }
- BOOST_INTRUSIVE_FORCEINLINE static const_node_ptr to_node_ptr (const value_type &value)
- { return pointer_traits<const_node_ptr>::pointer_to(value); }
- BOOST_INTRUSIVE_FORCEINLINE static const pointer & to_value_ptr(const node_ptr &n) { return n; }
- BOOST_INTRUSIVE_FORCEINLINE static const const_pointer &to_value_ptr(const const_node_ptr &n) { return n; }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TRIVIAL_VALUE_TRAITS_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/unordered_set.hpp b/contrib/restricted/boost/boost/intrusive/unordered_set.hpp
deleted file mode 100644
index cf60dc4f7a5..00000000000
--- a/contrib/restricted/boost/boost/intrusive/unordered_set.hpp
+++ /dev/null
@@ -1,990 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// 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_UNORDERED_SET_HPP
-#define BOOST_INTRUSIVE_UNORDERED_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/hashtable.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! The class template unordered_set is an intrusive container, that mimics most of
-//! the interface of std::tr1::unordered_set as described in the C++ TR1.
-//!
-//! unordered_set is a semi-intrusive container: each object to be stored in the
-//! container must contain a proper hook, but the container also needs
-//! additional auxiliary memory to work: unordered_set needs a pointer to an array
-//! of type `bucket_type` to be passed in the constructor. This bucket array must
-//! have at least the same lifetime as the container. This makes the use of
-//! unordered_set more complicated than purely intrusive containers.
-//! `bucket_type` is default-constructible, copyable and assignable
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
-//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
-//!
-//! unordered_set only provides forward iterators but it provides 4 iterator types:
-//! iterator and const_iterator to navigate through the whole container and
-//! local_iterator and const_local_iterator to navigate through the values
-//! stored in a single bucket. Local iterators are faster and smaller.
-//!
-//! It's not recommended to use non constant-time size unordered_sets because several
-//! key functions, like "empty()", become non-constant time functions. Non
-//! constant-time size unordered_sets are mainly provided to support auto-unlink hooks.
-//!
-//! unordered_set, unlike std::unordered_set, does not make automatic rehashings nor
-//! offers functions related to a load factor. Rehashing can be explicitly requested
-//! and the user must provide a new bucket array that will be used from that moment.
-//!
-//! Since no automatic rehashing is done, iterators are never invalidated when
-//! inserting or erasing elements. Iterators are only invalidated when rehasing.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
-#endif
-class unordered_set_impl
- : public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos>
-{
- /// @cond
- private:
- typedef hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos> table_type;
-
- template<class Iterator, class MaybeConstThis, class KeyType, class KeyHasher, class KeyEqual>
- static std::pair<Iterator,Iterator> priv_equal_range(MaybeConstThis &c, const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
- {
- Iterator const it = c.find(key, hash_func, equal_func);
- std::pair<Iterator,Iterator> ret(it, it);
- if(it != c.end())
- ++ret.second;
- return ret;
- }
-
- //! This class is
- //! movable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_set_impl)
-
- typedef table_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::bucket_traits bucket_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::key_equal key_equal;
- typedef typename implementation_defined::hasher hasher;
- typedef typename implementation_defined::bucket_type bucket_type;
- typedef typename implementation_defined::bucket_ptr bucket_ptr;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::local_iterator local_iterator;
- typedef typename implementation_defined::const_local_iterator const_local_iterator;
- typedef typename implementation_defined::node_traits node_traits;
- 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:
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- BOOST_INTRUSIVE_FORCEINLINE explicit unordered_set_impl( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(bool,Iterator,Iterator,const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl( Iterator b
- , Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(true, b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(hashtable&&)
- BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl(BOOST_RV_REF(unordered_set_impl) x)
- : table_type(BOOST_MOVE_BASE(table_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::operator=(hashtable&&)
- BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl& operator=(BOOST_RV_REF(unordered_set_impl) x)
- { return static_cast<unordered_set_impl&>(table_type::operator=(BOOST_MOVE_BASE(table_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::hashtable::~hashtable()
- ~unordered_set_impl();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::hashtable::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hash_function()const
- hasher hash_function() const;
-
- //! @copydoc ::boost::intrusive::hashtable::key_eq()const
- key_equal key_eq() const;
-
- //! @copydoc ::boost::intrusive::hashtable::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::hashtable::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable
- void swap(unordered_set_impl& other);
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(const hashtable&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const unordered_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using table_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(hashtable&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_set_impl) src, Cloner cloner, Disposer disposer)
- { table_type::clone_from(BOOST_MOVE_BASE(table_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique(reference)
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert(reference value)
- { return table_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique(Iterator,Iterator)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE void insert(Iterator b, Iterator e)
- { table_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique_check(const key_type&,insert_commit_data&)
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_check(const key_type &key, insert_commit_data &commit_data)
- { return table_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique_check(const KeyType&,KeyHasher,KeyEqual,insert_commit_data&)
- template<class KeyType, class KeyHasher, class KeyEqual>
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyHasher hasher, KeyEqual key_value_equal, insert_commit_data &commit_data)
- { return table_type::insert_unique_check(key, hasher, key_value_equal, commit_data); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique_commit
- BOOST_INTRUSIVE_FORCEINLINE iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return table_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator)
- void erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
- void erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const KeyType&,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- BOOST_INTRUSIVE_DOC1ST(void
- , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
- erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const KeyType&,KeyHasher,KeyEqual,Disposer)
- template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::count(const KeyType&,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type count(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- const_iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
- #endif
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->equal_range(key, this->hash_function(), this->key_eq()); }
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
- { return this->priv_equal_range<iterator>(*this, key, hash_func, equal_func); }
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->equal_range(key, this->hash_function(), this->key_eq()); }
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const
- { return this->priv_equal_range<const_iterator>(*this, key, hash_func, equal_func); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
- static local_iterator s_local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
- static const_local_iterator s_local_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
- local_iterator local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
- const_local_iterator local_iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_count
- size_type bucket_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_size
- size_type bucket_size(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
- size_type bucket(const key_type& k) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const KeyType&,KeyHasher)const
- template<class KeyType, class KeyHasher>
- size_type bucket(const KeyType& k, KeyHasher hash_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_pointer
- bucket_ptr bucket_pointer() const;
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)
- local_iterator begin(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
- const_local_iterator begin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
- const_local_iterator cbegin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)
- local_iterator end(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)const
- const_local_iterator end(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
- const_local_iterator cend(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
- void rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::full_rehash
- void full_rehash();
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
- bool incremental_rehash(bool grow = true);
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(const bucket_traits &)
- bool incremental_rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::split_count
- size_type split_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
- static size_type suggested_upper_bucket_count(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
- static size_type suggested_lower_bucket_count(size_type n);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- friend bool operator==(const unordered_set_impl &x, const unordered_set_impl &y)
- {
- if(table_type::constant_time_size && x.size() != y.size()){
- return false;
- }
- //Find each element of x in y
- for (const_iterator ix = x.cbegin(), ex = x.cend(), ey = y.cend(); ix != ex; ++ix){
- const_iterator iy = y.find(key_of_value()(*ix));
- if (iy == ey || !(*ix == *iy))
- return false;
- }
- return true;
- }
-
- friend bool operator!=(const unordered_set_impl &x, const unordered_set_impl &y)
- { return !(x == y); }
-
- friend bool operator<(const unordered_set_impl &x, const unordered_set_impl &y)
- { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- friend bool operator>(const unordered_set_impl &x, const unordered_set_impl &y)
- { return y < x; }
-
- friend bool operator<=(const unordered_set_impl &x, const unordered_set_impl &y)
- { return !(y < x); }
-
- friend bool operator>=(const unordered_set_impl &x, const unordered_set_impl &y)
- { return !(x < y); }
-};
-
-//! Helper metafunction to define an \c unordered_set that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void
- , class O7 = void, class O8 = void
- , class O9 = void, class O10= void
- >
-#endif
-struct make_unordered_set
-{
- /// @cond
- typedef typename pack_options
- < hashtable_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef typename make_bucket_traits
- <T, true, packed_options>::type bucket_traits;
-
- typedef unordered_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::hash
- , typename packed_options::equal
- , typename packed_options::size_type
- , bucket_traits
- , (std::size_t(true)*hash_bool_flags::unique_keys_pos)
- | (std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
- | (std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
- | (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)
- > implementation_defined;
-
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#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
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_unordered_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::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));
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_set)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::bucket_traits bucket_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::bucket_ptr bucket_ptr;
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::key_equal key_equal;
-
- explicit unordered_set ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b_traits, hash_func, equal_func, v_traits)
- {}
-
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE unordered_set
- ( Iterator b, Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_set(BOOST_RV_REF(unordered_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_set& operator=(BOOST_RV_REF(unordered_set) x)
- { return static_cast<unordered_set&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- 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); }
-
- 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); }
-};
-
-#endif
-
-
-//! The class template unordered_multiset is an intrusive container, that mimics most of
-//! the interface of std::tr1::unordered_multiset as described in the C++ TR1.
-//!
-//! unordered_multiset is a semi-intrusive container: each object to be stored in the
-//! container must contain a proper hook, but the container also needs
-//! additional auxiliary memory to work: unordered_multiset needs a pointer to an array
-//! of type `bucket_type` to be passed in the constructor. This bucket array must
-//! have at least the same lifetime as the container. This makes the use of
-//! unordered_multiset more complicated than purely intrusive containers.
-//! `bucket_type` is default-constructible, copyable and assignable
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
-//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
-//!
-//! unordered_multiset only provides forward iterators but it provides 4 iterator types:
-//! iterator and const_iterator to navigate through the whole container and
-//! local_iterator and const_local_iterator to navigate through the values
-//! stored in a single bucket. Local iterators are faster and smaller.
-//!
-//! It's not recommended to use non constant-time size unordered_multisets because several
-//! key functions, like "empty()", become non-constant time functions. Non
-//! constant-time size unordered_multisets are mainly provided to support auto-unlink hooks.
-//!
-//! unordered_multiset, unlike std::unordered_set, does not make automatic rehashings nor
-//! offers functions related to a load factor. Rehashing can be explicitly requested
-//! and the user must provide a new bucket array that will be used from that moment.
-//!
-//! Since no automatic rehashing is done, iterators are never invalidated when
-//! inserting or erasing elements. Iterators are only invalidated when rehasing.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
-#endif
-class unordered_multiset_impl
- : public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags>
-{
- /// @cond
- private:
- typedef hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags> table_type;
- /// @endcond
-
- //Movable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset_impl)
-
- typedef table_type implementation_defined;
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::bucket_traits bucket_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::key_equal key_equal;
- typedef typename implementation_defined::hasher hasher;
- typedef typename implementation_defined::bucket_type bucket_type;
- typedef typename implementation_defined::bucket_ptr bucket_ptr;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::local_iterator local_iterator;
- typedef typename implementation_defined::const_local_iterator const_local_iterator;
- typedef typename implementation_defined::node_traits node_traits;
- 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:
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- BOOST_INTRUSIVE_FORCEINLINE explicit unordered_multiset_impl ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(bool,Iterator,Iterator,const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl ( Iterator b
- , Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(false, b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! <b>Effects</b>: to-do
- //!
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl(BOOST_RV_REF(unordered_multiset_impl) x)
- : table_type(BOOST_MOVE_BASE(table_type, x))
- {}
-
- //! <b>Effects</b>: to-do
- //!
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl& operator=(BOOST_RV_REF(unordered_multiset_impl) x)
- { return static_cast<unordered_multiset_impl&>(table_type::operator=(BOOST_MOVE_BASE(table_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::~hashtable()
- ~unordered_multiset_impl();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::hashtable::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hash_function()const
- hasher hash_function() const;
-
- //! @copydoc ::boost::intrusive::hashtable::key_eq()const
- key_equal key_eq() const;
-
- //! @copydoc ::boost::intrusive::hashtable::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::hashtable::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable
- void swap(unordered_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(const hashtable&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const unordered_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using table_type::clone_from;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(hashtable&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_multiset_impl) src, Cloner cloner, Disposer disposer)
- { table_type::clone_from(BOOST_MOVE_BASE(table_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_equal(reference)
- BOOST_INTRUSIVE_FORCEINLINE iterator insert(reference value)
- { return table_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_equal(Iterator,Iterator)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE void insert(Iterator b, Iterator e)
- { table_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator)
- void erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
- void erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const KeyType&,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- BOOST_INTRUSIVE_DOC1ST(void
- , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
- erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const KeyType&,KeyHasher,KeyEqual,Disposer)
- template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::count(const KeyType&,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type count(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- const_iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
- static local_iterator s_local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
- static const_local_iterator s_local_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
- local_iterator local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
- const_local_iterator local_iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_count
- size_type bucket_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_size
- size_type bucket_size(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
- size_type bucket(const key_type& k) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const KeyType&,KeyHasher)const
- template<class KeyType, class KeyHasher>
- size_type bucket(const KeyType& k, KeyHasher hash_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_pointer
- bucket_ptr bucket_pointer() const;
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)
- local_iterator begin(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
- const_local_iterator begin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
- const_local_iterator cbegin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)
- local_iterator end(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)const
- const_local_iterator end(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
- const_local_iterator cend(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
- void rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::full_rehash
- void full_rehash();
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
- bool incremental_rehash(bool grow = true);
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(const bucket_traits &)
- bool incremental_rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::split_count
- size_type split_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
- static size_type suggested_upper_bucket_count(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
- static size_type suggested_lower_bucket_count(size_type n);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-//! Helper metafunction to define an \c unordered_multiset that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void
- , class O7 = void, class O8 = void
- , class O9 = void, class O10= void
- >
-#endif
-struct make_unordered_multiset
-{
- /// @cond
- typedef typename pack_options
- < hashtable_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef typename make_bucket_traits
- <T, true, packed_options>::type bucket_traits;
-
- typedef unordered_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::hash
- , typename packed_options::equal
- , typename packed_options::size_type
- , bucket_traits
- , (std::size_t(false)*hash_bool_flags::unique_keys_pos)
- | (std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
- | (std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
- | (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)
- > implementation_defined;
-
- /// @endcond
- typedef implementation_defined type;
-};
-
-#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>
-#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
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_unordered_multiset
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::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));
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::bucket_traits bucket_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::bucket_ptr bucket_ptr;
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::key_equal key_equal;
-
- explicit unordered_multiset( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b_traits, hash_func, equal_func, v_traits)
- {}
-
- template<class Iterator> BOOST_INTRUSIVE_FORCEINLINE
- unordered_multiset( Iterator b
- , Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset(BOOST_RV_REF(unordered_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x)
- { return static_cast<unordered_multiset&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- 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); }
-
- 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); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_UNORDERED_SET_HPP
diff --git a/contrib/restricted/boost/boost/intrusive/unordered_set_hook.hpp b/contrib/restricted/boost/boost/intrusive/unordered_set_hook.hpp
deleted file mode 100644
index a18d2354c4d..00000000000
--- a/contrib/restricted/boost/boost/intrusive/unordered_set_hook.hpp
+++ /dev/null
@@ -1,459 +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_UNORDERED_SET_HOOK_HPP
-#define BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/slist_hook.hpp>
-#include <boost/intrusive/options.hpp>
-#include <boost/intrusive/detail/generic_hook.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
-struct unordered_node
- : public slist_node<VoidPointer>
-{
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < unordered_node<VoidPointer, StoreHash, OptimizeMultiKey> >::type
- node_ptr;
- node_ptr prev_in_group_;
- std::size_t hash_;
-};
-
-template<class VoidPointer>
-struct unordered_node<VoidPointer, false, true>
- : public slist_node<VoidPointer>
-{
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < unordered_node<VoidPointer, false, true> >::type
- node_ptr;
- node_ptr prev_in_group_;
-};
-
-template<class VoidPointer>
-struct unordered_node<VoidPointer, true, false>
- : public slist_node<VoidPointer>
-{
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < unordered_node<VoidPointer, true, false> >::type
- node_ptr;
- std::size_t hash_;
-};
-
-template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
-struct unordered_node_traits
- : public slist_node_traits<VoidPointer>
-{
- typedef slist_node_traits<VoidPointer> reduced_slist_node_traits;
- typedef unordered_node<VoidPointer, StoreHash, OptimizeMultiKey> node;
-
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < node >::type node_ptr;
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < const node >::type const_node_ptr;
-
- static const bool store_hash = StoreHash;
- static const bool optimize_multikey = OptimizeMultiKey;
-
- static node_ptr get_next(const const_node_ptr & n)
- { return pointer_traits<node_ptr>::static_cast_from(n->next_); }
-
- static void set_next(const node_ptr & n, const node_ptr & next)
- { n->next_ = next; }
-
- static node_ptr get_prev_in_group(const const_node_ptr & n)
- { return n->prev_in_group_; }
-
- static void set_prev_in_group(const node_ptr & n, const node_ptr & prev)
- { n->prev_in_group_ = prev; }
-
- static std::size_t get_hash(const const_node_ptr & n)
- { return n->hash_; }
-
- static void set_hash(const node_ptr & n, std::size_t h)
- { n->hash_ = h; }
-};
-
-template<class NodeTraits>
-struct unordered_group_adapter
-{
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- static node_ptr get_next(const const_node_ptr & n)
- { return NodeTraits::get_prev_in_group(n); }
-
- static void set_next(const node_ptr & n, const node_ptr & next)
- { NodeTraits::set_prev_in_group(n, next); }
-};
-
-template<class NodeTraits>
-struct unordered_algorithms
- : public circular_slist_algorithms<NodeTraits>
-{
- typedef circular_slist_algorithms<NodeTraits> base_type;
- typedef unordered_group_adapter<NodeTraits> group_traits;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- static void init(typename base_type::node_ptr n)
- {
- base_type::init(n);
- group_algorithms::init(n);
- }
-
- static void init_header(typename base_type::node_ptr n)
- {
- base_type::init_header(n);
- group_algorithms::init_header(n);
- }
-
- static void unlink(typename base_type::node_ptr n)
- {
- base_type::unlink(n);
- group_algorithms::unlink(n);
- }
-};
-
-//Class to avoid defining the same algo as a circular list, as hooks would be ambiguous between them
-template<class Algo>
-struct uset_algo_wrapper : public Algo
-{};
-
-template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
-struct get_uset_node_traits
-{
- typedef typename detail::if_c
- < (StoreHash || OptimizeMultiKey)
- , unordered_node_traits<VoidPointer, StoreHash, OptimizeMultiKey>
- , slist_node_traits<VoidPointer>
- >::type type;
-};
-
-template<bool OptimizeMultiKey>
-struct get_uset_algo_type
-{
- static const algo_types value = OptimizeMultiKey ? UnorderedAlgorithms : UnorderedCircularSlistAlgorithms;
-};
-
-template<class NodeTraits>
-struct get_algo<UnorderedAlgorithms, NodeTraits>
-{
- typedef unordered_algorithms<NodeTraits> type;
-};
-
-template<class NodeTraits>
-struct get_algo<UnorderedCircularSlistAlgorithms, NodeTraits>
-{
- typedef uset_algo_wrapper< circular_slist_algorithms<NodeTraits> > type;
-};
-
-/// @endcond
-
-//! Helper metafunction to define a \c unordered_set_base_hook that yields to the same
-//! type when the same options (either explicitly or implicitly) are used.
-#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, class O4 = void>
-#endif
-struct make_unordered_set_base_hook
-{
- /// @cond
- typedef typename pack_options
- < hook_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef generic_hook
- < get_uset_algo_type <packed_options::optimize_multikey>::value
- , typename get_uset_node_traits < typename packed_options::void_pointer
- , packed_options::store_hash
- , packed_options::optimize_multikey
- >::type
- , typename packed_options::tag
- , packed_options::link_mode
- , HashBaseHookId
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-//! Derive a class from unordered_set_base_hook in order to store objects in
-//! in an unordered_set/unordered_multi_set. unordered_set_base_hook holds the data necessary to maintain
-//! the unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set.
-//!
-//! The hook admits the following options: \c tag<>, \c void_pointer<>,
-//! \c link_mode<>, \c store_hash<> and \c optimize_multikey<>.
-//!
-//! \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 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).
-//!
-//! \c store_hash<> will tell the hook to store the hash of the value
-//! to speed up rehashings.
-//!
-//! \c optimize_multikey<> will tell the hook to store a link to form a group
-//! with other value with the same value to speed up searches and insertions
-//! in unordered_multisets with a great number of with equivalent keys.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1, class O2, class O3, class O4>
-#endif
-class unordered_set_base_hook
- : public make_unordered_set_base_hook<
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #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.
- unordered_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.
- unordered_set_base_hook(const unordered_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.
- unordered_set_base_hook& operator=(const unordered_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 an unordered_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.
- ~unordered_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(unordered_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 unordered_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 unordered_set_member_hook that yields to the same
-//! type when the same options (either explicitly or implicitly) are used.
-#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, class O4 = void>
-#endif
-struct make_unordered_set_member_hook
-{
- /// @cond
- typedef typename pack_options
- < hook_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef generic_hook
- < get_uset_algo_type <packed_options::optimize_multikey>::value
- , typename get_uset_node_traits < typename packed_options::void_pointer
- , packed_options::store_hash
- , packed_options::optimize_multikey
- >::type
- , member_tag
- , packed_options::link_mode
- , NoBaseHookId
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-//! Put a public data member unordered_set_member_hook in order to store objects of this class in
-//! an unordered_set/unordered_multi_set. unordered_set_member_hook holds the data necessary for maintaining the
-//! unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set.
-//!
-//! The hook admits the following options: \c void_pointer<>,
-//! \c link_mode<> and \c store_hash<>.
-//!
-//! \c void_pointer<> is the pointer type that will be used internally in the hook
-//! and 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).
-//!
-//! \c store_hash<> will tell the hook to store the hash of the value
-//! to speed up rehashings.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1, class O2, class O3, class O4>
-#endif
-class unordered_set_member_hook
- : public make_unordered_set_member_hook<
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #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.
- unordered_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.
- unordered_set_member_hook(const unordered_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.
- unordered_set_member_hook& operator=(const unordered_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 an unordered_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.
- ~unordered_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(unordered_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 unordered_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_UNORDERED_SET_HOOK_HPP
diff --git a/contrib/restricted/boost/intrusive/CMakeLists.txt b/contrib/restricted/boost/intrusive/CMakeLists.txt
new file mode 100644
index 00000000000..3ba1f7e062d
--- /dev/null
+++ b/contrib/restricted/boost/intrusive/CMakeLists.txt
@@ -0,0 +1,23 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(restricted-boost-intrusive INTERFACE)
+target_include_directories(restricted-boost-intrusive INTERFACE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/intrusive/include
+)
+target_link_libraries(restricted-boost-intrusive INTERFACE
+ contrib-libs-cxxsupp
+ yutil
+ restricted-boost-assert
+ restricted-boost-config
+ restricted-boost-container_hash
+ restricted-boost-core
+ restricted-boost-move
+ restricted-boost-static_assert
+)
diff --git a/contrib/restricted/boost/boost/intrusive/avl_set_hook.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/avl_set_hook.hpp
index 187130365b9..187130365b9 100644
--- a/contrib/restricted/boost/boost/intrusive/avl_set_hook.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/avl_set_hook.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/avltree.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/avltree.hpp
index cdc9b75d608..cdc9b75d608 100644
--- a/contrib/restricted/boost/boost/intrusive/avltree.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/avltree.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/avltree_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/avltree_algorithms.hpp
index 1459851fb4f..1459851fb4f 100644
--- a/contrib/restricted/boost/boost/intrusive/avltree_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/avltree_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/bs_set_hook.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/bs_set_hook.hpp
index a64c15ace59..a64c15ace59 100644
--- a/contrib/restricted/boost/boost/intrusive/bs_set_hook.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/bs_set_hook.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/bstree.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/bstree.hpp
index 410eedf9303..410eedf9303 100644
--- a/contrib/restricted/boost/boost/intrusive/bstree.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/bstree.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/bstree_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/bstree_algorithms.hpp
index e449ebac081..e449ebac081 100644
--- a/contrib/restricted/boost/boost/intrusive/bstree_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/bstree_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/circular_list_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/circular_list_algorithms.hpp
index 0bc4d9de90d..0bc4d9de90d 100644
--- a/contrib/restricted/boost/boost/intrusive/circular_list_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/circular_list_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/circular_slist_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/circular_slist_algorithms.hpp
index da840ef0c1d..da840ef0c1d 100644
--- a/contrib/restricted/boost/boost/intrusive/circular_slist_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/circular_slist_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/derivation_value_traits.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/derivation_value_traits.hpp
index 06991983f3d..06991983f3d 100644
--- a/contrib/restricted/boost/boost/intrusive/derivation_value_traits.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/derivation_value_traits.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/algo_type.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/algo_type.hpp
index 70ec63f5740..70ec63f5740 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/algo_type.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/algo_type.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/algorithm.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/algorithm.hpp
index d2421ffaad6..d2421ffaad6 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/algorithm.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/algorithm.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/array_initializer.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/array_initializer.hpp
index 126a253afb8..126a253afb8 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/array_initializer.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/array_initializer.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/assert.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/assert.hpp
index 7199eb240c9..7199eb240c9 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/assert.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/assert.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/avltree_node.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/avltree_node.hpp
index 16d1c1d291c..16d1c1d291c 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/avltree_node.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/avltree_node.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/bstree_algorithms_base.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/bstree_algorithms_base.hpp
index 84040105658..84040105658 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/bstree_algorithms_base.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/bstree_algorithms_base.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/common_slist_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/common_slist_algorithms.hpp
index 5e6ff4d1aa3..5e6ff4d1aa3 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/common_slist_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/common_slist_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/config_begin.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/config_begin.hpp
index 8bd57a3b512..8bd57a3b512 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/config_begin.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/config_begin.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/config_end.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/config_end.hpp
index a081443e69e..a081443e69e 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/config_end.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/config_end.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/default_header_holder.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/default_header_holder.hpp
index ba561b5f5bc..ba561b5f5bc 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/default_header_holder.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/default_header_holder.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/ebo_functor_holder.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/ebo_functor_holder.hpp
index 27415c11703..27415c11703 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/ebo_functor_holder.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/ebo_functor_holder.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/empty_node_checker.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/empty_node_checker.hpp
index 16aa5600e71..16aa5600e71 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/empty_node_checker.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/empty_node_checker.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/equal_to_value.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/equal_to_value.hpp
index c5d9e5305c1..c5d9e5305c1 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/equal_to_value.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/equal_to_value.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/exception_disposer.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/exception_disposer.hpp
index 91c5bf3b67f..91c5bf3b67f 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/exception_disposer.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/exception_disposer.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/function_detector.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/function_detector.hpp
index 5ecaeaf0731..5ecaeaf0731 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/function_detector.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/function_detector.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/generic_hook.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/generic_hook.hpp
index 13421b88050..13421b88050 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/generic_hook.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/generic_hook.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/get_value_traits.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/get_value_traits.hpp
index 222f8078a64..222f8078a64 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/get_value_traits.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/get_value_traits.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/has_member_function_callable_with.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/has_member_function_callable_with.hpp
index 92ef60ee6df..92ef60ee6df 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/has_member_function_callable_with.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/has_member_function_callable_with.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/hook_traits.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/hook_traits.hpp
index 7a6f206ca2b..7a6f206ca2b 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/hook_traits.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/hook_traits.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/iiterator.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/iiterator.hpp
index 5ab1de2bb12..5ab1de2bb12 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/iiterator.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/iiterator.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/is_stateful_value_traits.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/is_stateful_value_traits.hpp
index e43f6d340ac..e43f6d340ac 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/is_stateful_value_traits.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/is_stateful_value_traits.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/iterator.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/iterator.hpp
index c25be430a2c..c25be430a2c 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/iterator.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/iterator.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/key_nodeptr_comp.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/key_nodeptr_comp.hpp
index bdc025e5ab3..bdc025e5ab3 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/key_nodeptr_comp.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/key_nodeptr_comp.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/list_iterator.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/list_iterator.hpp
index 08ba8a3775b..08ba8a3775b 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/list_iterator.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/list_iterator.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/list_node.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/list_node.hpp
index c3b48470116..c3b48470116 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/list_node.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/list_node.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/math.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/math.hpp
index 4901053cb3e..4901053cb3e 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/math.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/math.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/minimal_less_equal_header.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/minimal_less_equal_header.hpp
index 5e8a19debf9..5e8a19debf9 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/minimal_less_equal_header.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/minimal_less_equal_header.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/minimal_pair_header.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/minimal_pair_header.hpp
index 1358a085881..1358a085881 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/minimal_pair_header.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/minimal_pair_header.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/mpl.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/mpl.hpp
index 15230881611..15230881611 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/mpl.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/mpl.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/node_cloner_disposer.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/node_cloner_disposer.hpp
index 3fe29543474..3fe29543474 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/node_cloner_disposer.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/node_cloner_disposer.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/node_holder.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/node_holder.hpp
index b8dabef2dfa..b8dabef2dfa 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/node_holder.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/node_holder.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/parent_from_member.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/parent_from_member.hpp
index 275229ab474..275229ab474 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/parent_from_member.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/parent_from_member.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/rbtree_node.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/rbtree_node.hpp
index 68f4bdf8e28..68f4bdf8e28 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/rbtree_node.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/rbtree_node.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/reverse_iterator.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/reverse_iterator.hpp
index 57631feb5d4..57631feb5d4 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/reverse_iterator.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/reverse_iterator.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/simple_disposers.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/simple_disposers.hpp
index 1420b281b04..1420b281b04 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/simple_disposers.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/simple_disposers.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/size_holder.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/size_holder.hpp
index bd14dc50499..bd14dc50499 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/size_holder.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/size_holder.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/slist_iterator.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/slist_iterator.hpp
index a78e63f074d..a78e63f074d 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/slist_iterator.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/slist_iterator.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/slist_node.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/slist_node.hpp
index 848764e571d..848764e571d 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/slist_node.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/slist_node.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/std_fwd.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/std_fwd.hpp
index 8193ea8ed1f..8193ea8ed1f 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/std_fwd.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/std_fwd.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/tree_iterator.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_iterator.hpp
index 41988cf1803..41988cf1803 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/tree_iterator.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_iterator.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/tree_node.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_node.hpp
index 606fbc865e5..606fbc865e5 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/tree_node.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_node.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/tree_value_compare.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_value_compare.hpp
index f6dd01dc256..f6dd01dc256 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/tree_value_compare.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/tree_value_compare.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/uncast.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/uncast.hpp
index 7db97b74571..7db97b74571 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/uncast.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/uncast.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/detail/workaround.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/workaround.hpp
index 594ac0b2e54..594ac0b2e54 100644
--- a/contrib/restricted/boost/boost/intrusive/detail/workaround.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/detail/workaround.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/intrusive_fwd.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/intrusive_fwd.hpp
index f51276d636e..f51276d636e 100644
--- a/contrib/restricted/boost/boost/intrusive/intrusive_fwd.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/intrusive_fwd.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/linear_slist_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/linear_slist_algorithms.hpp
index 6c8e9b797c0..6c8e9b797c0 100644
--- a/contrib/restricted/boost/boost/intrusive/linear_slist_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/linear_slist_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/link_mode.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/link_mode.hpp
index 4ba4daff7d7..4ba4daff7d7 100644
--- a/contrib/restricted/boost/boost/intrusive/link_mode.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/link_mode.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/list.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/list.hpp
index 71eac5c42e7..71eac5c42e7 100644
--- a/contrib/restricted/boost/boost/intrusive/list.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/list.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/list_hook.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/list_hook.hpp
index 892e4e20d7d..892e4e20d7d 100644
--- a/contrib/restricted/boost/boost/intrusive/list_hook.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/list_hook.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/options.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/options.hpp
index 6523ffb5742..6523ffb5742 100644
--- a/contrib/restricted/boost/boost/intrusive/options.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/options.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/pack_options.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/pack_options.hpp
index 944243f661c..944243f661c 100644
--- a/contrib/restricted/boost/boost/intrusive/pack_options.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/pack_options.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/parent_from_member.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/parent_from_member.hpp
index a9a9293c7ca..a9a9293c7ca 100644
--- a/contrib/restricted/boost/boost/intrusive/parent_from_member.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/parent_from_member.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/pointer_plus_bits.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_plus_bits.hpp
index a39da324431..a39da324431 100644
--- a/contrib/restricted/boost/boost/intrusive/pointer_plus_bits.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_plus_bits.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/pointer_rebind.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_rebind.hpp
index 9592e06e1de..9592e06e1de 100644
--- a/contrib/restricted/boost/boost/intrusive/pointer_rebind.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_rebind.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/pointer_traits.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_traits.hpp
index 4216c7ee9ca..4216c7ee9ca 100644
--- a/contrib/restricted/boost/boost/intrusive/pointer_traits.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/pointer_traits.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/rbtree.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/rbtree.hpp
index 4f5d86dd6aa..4f5d86dd6aa 100644
--- a/contrib/restricted/boost/boost/intrusive/rbtree.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/rbtree.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/rbtree_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/rbtree_algorithms.hpp
index 6a7c563cf08..6a7c563cf08 100644
--- a/contrib/restricted/boost/boost/intrusive/rbtree_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/rbtree_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/set.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/set.hpp
index 3cd9013d4b7..3cd9013d4b7 100644
--- a/contrib/restricted/boost/boost/intrusive/set.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/set.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/set_hook.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/set_hook.hpp
index e303b6442be..e303b6442be 100644
--- a/contrib/restricted/boost/boost/intrusive/set_hook.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/set_hook.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/sgtree.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/sgtree.hpp
index 033efb878d6..033efb878d6 100644
--- a/contrib/restricted/boost/boost/intrusive/sgtree.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/sgtree.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/sgtree_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/sgtree_algorithms.hpp
index e6002a73b03..e6002a73b03 100644
--- a/contrib/restricted/boost/boost/intrusive/sgtree_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/sgtree_algorithms.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/slist.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/slist.hpp
index 1f7ace18422..1f7ace18422 100644
--- a/contrib/restricted/boost/boost/intrusive/slist.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/slist.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/slist_hook.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/slist_hook.hpp
index 0f37772c6d1..0f37772c6d1 100644
--- a/contrib/restricted/boost/boost/intrusive/slist_hook.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/slist_hook.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/splaytree.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/splaytree.hpp
index f6a1a93a9dd..f6a1a93a9dd 100644
--- a/contrib/restricted/boost/boost/intrusive/splaytree.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/splaytree.hpp
diff --git a/contrib/restricted/boost/boost/intrusive/splaytree_algorithms.hpp b/contrib/restricted/boost/intrusive/include/boost/intrusive/splaytree_algorithms.hpp
index be2e18227ed..be2e18227ed 100644
--- a/contrib/restricted/boost/boost/intrusive/splaytree_algorithms.hpp
+++ b/contrib/restricted/boost/intrusive/include/boost/intrusive/splaytree_algorithms.hpp