aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugaevskiy <bugaevskiy@yandex-team.com>2022-09-11 17:18:55 +0300
committerbugaevskiy <bugaevskiy@yandex-team.com>2022-09-11 17:18:55 +0300
commite6a7bb384bbe7e480192a4aad4f8f9067a76e47f (patch)
treea9577737bb6155de97c502932d7f52a853cc3390
parent42e073eb8bb6dfeb5cc6770982a06f2844e75dfa (diff)
downloadydb-e6a7bb384bbe7e480192a4aad4f8f9067a76e47f.tar.gz
Reimport boost/multi_index as a separate project
-rw-r--r--contrib/restricted/boost/CMakeLists.txt2
-rw-r--r--contrib/restricted/boost/boost/multi_index/composite_key.hpp1513
-rw-r--r--contrib/restricted/boost/boost/multi_index/detail/cons_stdtuple.hpp93
-rw-r--r--contrib/restricted/boost/boost/multi_index/detail/rnd_index_loader.hpp173
-rw-r--r--contrib/restricted/boost/boost/multi_index/detail/rnd_index_node.hpp283
-rw-r--r--contrib/restricted/boost/boost/multi_index/detail/rnd_index_ops.hpp203
-rw-r--r--contrib/restricted/boost/boost/multi_index/detail/rnd_index_ptr_array.hpp152
-rw-r--r--contrib/restricted/boost/boost/multi_index/detail/rnd_node_iterator.hpp140
-rw-r--r--contrib/restricted/boost/boost/multi_index/detail/rnk_index_ops.hpp300
-rw-r--r--contrib/restricted/boost/boost/multi_index/global_fun.hpp185
-rw-r--r--contrib/restricted/boost/boost/multi_index/key_extractors.hpp22
-rw-r--r--contrib/restricted/boost/boost/multi_index/random_access_index.hpp1185
-rw-r--r--contrib/restricted/boost/boost/multi_index/random_access_index_fwd.hpp91
-rw-r--r--contrib/restricted/boost/boost/multi_index/ranked_index.hpp382
-rw-r--r--contrib/restricted/boost/boost/multi_index/ranked_index_fwd.hpp35
-rw-r--r--contrib/restricted/boost/libs/CMakeLists.txt1
-rw-r--r--contrib/restricted/boost/libs/multi_index/CMakeLists.txt15
-rw-r--r--contrib/restricted/boost/multi_index/CMakeLists.txt36
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/access_specifier.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/access_specifier.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/adl_swap.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/adl_swap.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/archive_constructed.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/archive_constructed.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/auto_space.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/auto_space.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/base_type.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/base_type.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/bidir_node_iterator.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/bidir_node_iterator.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/bucket_array.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/bucket_array.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/converter.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/converter.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/copy_map.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/copy_map.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/do_not_copy_elements_tag.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/do_not_copy_elements_tag.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/duplicates_iterator.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/duplicates_iterator.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/has_tag.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/has_tag.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_args.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/hash_index_args.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_iterator.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/hash_index_iterator.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_node.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/hash_index_node.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/header_holder.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/header_holder.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ignore_wstrict_aliasing.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/ignore_wstrict_aliasing.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_base.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/index_base.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_loader.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/index_loader.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_matcher.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/index_matcher.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_node_base.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/index_node_base.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_saver.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/index_saver.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/invariant_assert.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/invariant_assert.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/is_index_list.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/is_index_list.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/is_transparent.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/is_transparent.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/iter_adaptor.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/iter_adaptor.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/modify_key_adaptor.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/modify_key_adaptor.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/no_duplicate_tags.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/no_duplicate_tags.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/node_type.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/node_type.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_args.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/ord_index_args.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_impl.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/ord_index_impl.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_impl_fwd.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/ord_index_impl_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_node.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/ord_index_node.hpp)4
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_ops.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/ord_index_ops.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/promotes_arg.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/promotes_arg.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/raw_ptr.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/raw_ptr.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/restore_wstrict_aliasing.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/restore_wstrict_aliasing.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/safe_mode.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/safe_mode.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/scope_guard.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/scope_guard.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/seq_index_node.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/seq_index_node.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/seq_index_ops.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/seq_index_ops.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/serialization_version.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/serialization_version.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/uintptr_type.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/uintptr_type.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/unbounded.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/unbounded.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/value_compare.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/value_compare.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/detail/vartempl_support.hpp (renamed from contrib/restricted/boost/boost/multi_index/detail/vartempl_support.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/hashed_index.hpp (renamed from contrib/restricted/boost/boost/multi_index/hashed_index.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/hashed_index_fwd.hpp (renamed from contrib/restricted/boost/boost/multi_index/hashed_index_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/identity.hpp (renamed from contrib/restricted/boost/boost/multi_index/identity.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/identity_fwd.hpp (renamed from contrib/restricted/boost/boost/multi_index/identity_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/indexed_by.hpp (renamed from contrib/restricted/boost/boost/multi_index/indexed_by.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/mem_fun.hpp (renamed from contrib/restricted/boost/boost/multi_index/mem_fun.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/member.hpp (renamed from contrib/restricted/boost/boost/multi_index/member.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/ordered_index.hpp (renamed from contrib/restricted/boost/boost/multi_index/ordered_index.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/ordered_index_fwd.hpp (renamed from contrib/restricted/boost/boost/multi_index/ordered_index_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/safe_mode_errors.hpp (renamed from contrib/restricted/boost/boost/multi_index/safe_mode_errors.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/sequenced_index.hpp (renamed from contrib/restricted/boost/boost/multi_index/sequenced_index.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/sequenced_index_fwd.hpp (renamed from contrib/restricted/boost/boost/multi_index/sequenced_index_fwd.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index/tag.hpp (renamed from contrib/restricted/boost/boost/multi_index/tag.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index_container.hpp (renamed from contrib/restricted/boost/boost/multi_index_container.hpp)0
-rw-r--r--contrib/restricted/boost/multi_index/include/boost/multi_index_container_fwd.hpp (renamed from contrib/restricted/boost/boost/multi_index_container_fwd.hpp)0
-rw-r--r--ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.darwin.txt4
-rw-r--r--ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.linux.txt4
81 files changed, 45 insertions, 4778 deletions
diff --git a/contrib/restricted/boost/CMakeLists.txt b/contrib/restricted/boost/CMakeLists.txt
index f0023a077a3..fa88ab7fb7d 100644
--- a/contrib/restricted/boost/CMakeLists.txt
+++ b/contrib/restricted/boost/CMakeLists.txt
@@ -52,6 +52,7 @@ add_subdirectory(move)
add_subdirectory(mp11)
add_subdirectory(mpl)
add_subdirectory(multi_array)
+add_subdirectory(multi_index)
add_subdirectory(multiprecision)
add_subdirectory(numeric_conversion)
add_subdirectory(optional)
@@ -126,6 +127,7 @@ target_link_libraries(contrib-restricted-boost INTERFACE
restricted-boost-mp11
restricted-boost-mpl
restricted-boost-multi_array
+ restricted-boost-multi_index
restricted-boost-multiprecision
restricted-boost-numeric_conversion
restricted-boost-optional
diff --git a/contrib/restricted/boost/boost/multi_index/composite_key.hpp b/contrib/restricted/boost/boost/multi_index/composite_key.hpp
deleted file mode 100644
index 787cdf83195..00000000000
--- a/contrib/restricted/boost/boost/multi_index/composite_key.hpp
+++ /dev/null
@@ -1,1513 +0,0 @@
-/* Copyright 2003-2015 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_COMPOSITE_KEY_HPP
-#define BOOST_MULTI_INDEX_COMPOSITE_KEY_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/functional/hash_fwd.hpp>
-#include <boost/multi_index/detail/access_specifier.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/control/expr_if.hpp>
-#include <boost/preprocessor/list/at.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <functional>
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
-#include <boost/ref.hpp>
-#endif
-
-#if !defined(BOOST_NO_SFINAE)
-#include <boost/type_traits/is_convertible.hpp>
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)&&\
- !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/multi_index/detail/cons_stdtuple.hpp>
-#endif
-
-/* A composite key stores n key extractors and "computes" the
- * result on a given value as a packed reference to the value and
- * the composite key itself. Actual invocations to the component
- * key extractors are lazily performed when executing an operation
- * on composite_key results (equality, comparison, hashing.)
- * As the other key extractors in Boost.MultiIndex, composite_key<T,...>
- * is overloaded to work on chained pointers to T and reference_wrappers
- * of T.
- */
-
-/* This user_definable macro limits the number of elements of a composite
- * key; useful for shortening resulting symbol names (MSVC++ 6.0, for
- * instance has problems coping with very long symbol names.)
- * NB: This cannot exceed the maximum number of arguments of
- * boost::tuple. In Boost 1.32, the limit is 10.
- */
-
-#if !defined(BOOST_MULTI_INDEX_LIMIT_COMPOSITE_KEY_SIZE)
-#define BOOST_MULTI_INDEX_LIMIT_COMPOSITE_KEY_SIZE 10
-#endif
-
-/* maximum number of key extractors in a composite key */
-
-#if BOOST_MULTI_INDEX_LIMIT_COMPOSITE_KEY_SIZE<10 /* max length of a tuple */
-#define BOOST_MULTI_INDEX_COMPOSITE_KEY_SIZE \
- BOOST_MULTI_INDEX_LIMIT_COMPOSITE_KEY_SIZE
-#else
-#define BOOST_MULTI_INDEX_COMPOSITE_KEY_SIZE 10
-#endif
-
-/* BOOST_PP_ENUM of BOOST_MULTI_INDEX_COMPOSITE_KEY_SIZE elements */
-
-#define BOOST_MULTI_INDEX_CK_ENUM(macro,data) \
- BOOST_PP_ENUM(BOOST_MULTI_INDEX_COMPOSITE_KEY_SIZE,macro,data)
-
-/* BOOST_PP_ENUM_PARAMS of BOOST_MULTI_INDEX_COMPOSITE_KEY_SIZE elements */
-
-#define BOOST_MULTI_INDEX_CK_ENUM_PARAMS(param) \
- BOOST_PP_ENUM_PARAMS(BOOST_MULTI_INDEX_COMPOSITE_KEY_SIZE,param)
-
-/* if n==0 -> text0
- * otherwise -> textn=tuples::null_type
- */
-
-#define BOOST_MULTI_INDEX_CK_TEMPLATE_PARM(z,n,text) \
- typename BOOST_PP_CAT(text,n) BOOST_PP_EXPR_IF(n,=tuples::null_type)
-
-/* const textn& kn=textn() */
-
-#define BOOST_MULTI_INDEX_CK_CTOR_ARG(z,n,text) \
- const BOOST_PP_CAT(text,n)& BOOST_PP_CAT(k,n) = BOOST_PP_CAT(text,n)()
-
-/* typename list(0)<list(1),n>::type */
-
-#define BOOST_MULTI_INDEX_CK_APPLY_METAFUNCTION_N(z,n,list) \
- BOOST_DEDUCED_TYPENAME BOOST_PP_LIST_AT(list,0)< \
- BOOST_PP_LIST_AT(list,1),n \
- >::type
-
-namespace boost{
-
-template<class T> class reference_wrapper; /* fwd decl. */
-
-namespace multi_index{
-
-namespace detail{
-
-/* n-th key extractor of a composite key */
-
-template<typename CompositeKey,int N>
-struct nth_key_from_value
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename mpl::eval_if_c<
- N<tuples::length<key_extractor_tuple>::value,
- tuples::element<N,key_extractor_tuple>,
- mpl::identity<tuples::null_type>
- >::type type;
-};
-
-/* nth_composite_key_##name<CompositeKey,N>::type yields
- * functor<nth_key_from_value<CompositeKey,N> >, or tuples::null_type
- * if N exceeds the length of the composite key.
- */
-
-#define BOOST_MULTI_INDEX_CK_NTH_COMPOSITE_KEY_FUNCTOR(name,functor) \
-template<typename KeyFromValue> \
-struct BOOST_PP_CAT(key_,name) \
-{ \
- typedef functor<typename KeyFromValue::result_type> type; \
-}; \
- \
-template<> \
-struct BOOST_PP_CAT(key_,name)<tuples::null_type> \
-{ \
- typedef tuples::null_type type; \
-}; \
- \
-template<typename CompositeKey,int N> \
-struct BOOST_PP_CAT(nth_composite_key_,name) \
-{ \
- typedef typename nth_key_from_value<CompositeKey,N>::type key_from_value; \
- typedef typename BOOST_PP_CAT(key_,name)<key_from_value>::type type; \
-};
-
-/* nth_composite_key_equal_to
- * nth_composite_key_less
- * nth_composite_key_greater
- * nth_composite_key_hash
- */
-
-BOOST_MULTI_INDEX_CK_NTH_COMPOSITE_KEY_FUNCTOR(equal_to,std::equal_to)
-BOOST_MULTI_INDEX_CK_NTH_COMPOSITE_KEY_FUNCTOR(less,std::less)
-BOOST_MULTI_INDEX_CK_NTH_COMPOSITE_KEY_FUNCTOR(greater,std::greater)
-BOOST_MULTI_INDEX_CK_NTH_COMPOSITE_KEY_FUNCTOR(hash,boost::hash)
-
-/* used for defining equality and comparison ops of composite_key_result */
-
-#define BOOST_MULTI_INDEX_CK_IDENTITY_ENUM_MACRO(z,n,text) text
-
-struct generic_operator_equal
-{
- template<typename T,typename Q>
- bool operator()(const T& x,const Q& y)const{return x==y;}
-};
-
-typedef tuple<
- BOOST_MULTI_INDEX_CK_ENUM(
- BOOST_MULTI_INDEX_CK_IDENTITY_ENUM_MACRO,
- detail::generic_operator_equal)> generic_operator_equal_tuple;
-
-struct generic_operator_less
-{
- template<typename T,typename Q>
- bool operator()(const T& x,const Q& y)const{return x<y;}
-};
-
-typedef tuple<
- BOOST_MULTI_INDEX_CK_ENUM(
- BOOST_MULTI_INDEX_CK_IDENTITY_ENUM_MACRO,
- detail::generic_operator_less)> generic_operator_less_tuple;
-
-/* Metaprogramming machinery for implementing equality, comparison and
- * hashing operations of composite_key_result.
- *
- * equal_* checks for equality between composite_key_results and
- * between those and tuples, accepting a tuple of basic equality functors.
- * compare_* does lexicographical comparison.
- * hash_* computes a combination of elementwise hash values.
- */
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename EqualCons
->
-struct equal_ckey_ckey; /* fwd decl. */
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename EqualCons
->
-struct equal_ckey_ckey_terminal
-{
- static bool compare(
- const KeyCons1&,const Value1&,
- const KeyCons2&,const Value2&,
- const EqualCons&)
- {
- return true;
- }
-};
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename EqualCons
->
-struct equal_ckey_ckey_normal
-{
- static bool compare(
- const KeyCons1& c0,const Value1& v0,
- const KeyCons2& c1,const Value2& v1,
- const EqualCons& eq)
- {
- if(!eq.get_head()(c0.get_head()(v0),c1.get_head()(v1)))return false;
- return equal_ckey_ckey<
- BOOST_DEDUCED_TYPENAME KeyCons1::tail_type,Value1,
- BOOST_DEDUCED_TYPENAME KeyCons2::tail_type,Value2,
- BOOST_DEDUCED_TYPENAME EqualCons::tail_type
- >::compare(c0.get_tail(),v0,c1.get_tail(),v1,eq.get_tail());
- }
-};
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename EqualCons
->
-struct equal_ckey_ckey:
- mpl::if_<
- mpl::or_<
- is_same<KeyCons1,tuples::null_type>,
- is_same<KeyCons2,tuples::null_type>
- >,
- equal_ckey_ckey_terminal<KeyCons1,Value1,KeyCons2,Value2,EqualCons>,
- equal_ckey_ckey_normal<KeyCons1,Value1,KeyCons2,Value2,EqualCons>
- >::type
-{
-};
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename EqualCons
->
-struct equal_ckey_cval; /* fwd decl. */
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename EqualCons
->
-struct equal_ckey_cval_terminal
-{
- static bool compare(
- const KeyCons&,const Value&,const ValCons&,const EqualCons&)
- {
- return true;
- }
-
- static bool compare(
- const ValCons&,const KeyCons&,const Value&,const EqualCons&)
- {
- return true;
- }
-};
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename EqualCons
->
-struct equal_ckey_cval_normal
-{
- static bool compare(
- const KeyCons& c,const Value& v,const ValCons& vc,
- const EqualCons& eq)
- {
- if(!eq.get_head()(c.get_head()(v),vc.get_head()))return false;
- return equal_ckey_cval<
- BOOST_DEDUCED_TYPENAME KeyCons::tail_type,Value,
- BOOST_DEDUCED_TYPENAME ValCons::tail_type,
- BOOST_DEDUCED_TYPENAME EqualCons::tail_type
- >::compare(c.get_tail(),v,vc.get_tail(),eq.get_tail());
- }
-
- static bool compare(
- const ValCons& vc,const KeyCons& c,const Value& v,
- const EqualCons& eq)
- {
- if(!eq.get_head()(vc.get_head(),c.get_head()(v)))return false;
- return equal_ckey_cval<
- BOOST_DEDUCED_TYPENAME KeyCons::tail_type,Value,
- BOOST_DEDUCED_TYPENAME ValCons::tail_type,
- BOOST_DEDUCED_TYPENAME EqualCons::tail_type
- >::compare(vc.get_tail(),c.get_tail(),v,eq.get_tail());
- }
-};
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename EqualCons
->
-struct equal_ckey_cval:
- mpl::if_<
- mpl::or_<
- is_same<KeyCons,tuples::null_type>,
- is_same<ValCons,tuples::null_type>
- >,
- equal_ckey_cval_terminal<KeyCons,Value,ValCons,EqualCons>,
- equal_ckey_cval_normal<KeyCons,Value,ValCons,EqualCons>
- >::type
-{
-};
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename CompareCons
->
-struct compare_ckey_ckey; /* fwd decl. */
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename CompareCons
->
-struct compare_ckey_ckey_terminal
-{
- static bool compare(
- const KeyCons1&,const Value1&,
- const KeyCons2&,const Value2&,
- const CompareCons&)
- {
- return false;
- }
-};
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename CompareCons
->
-struct compare_ckey_ckey_normal
-{
- static bool compare(
- const KeyCons1& c0,const Value1& v0,
- const KeyCons2& c1,const Value2& v1,
- const CompareCons& comp)
- {
- if(comp.get_head()(c0.get_head()(v0),c1.get_head()(v1)))return true;
- if(comp.get_head()(c1.get_head()(v1),c0.get_head()(v0)))return false;
- return compare_ckey_ckey<
- BOOST_DEDUCED_TYPENAME KeyCons1::tail_type,Value1,
- BOOST_DEDUCED_TYPENAME KeyCons2::tail_type,Value2,
- BOOST_DEDUCED_TYPENAME CompareCons::tail_type
- >::compare(c0.get_tail(),v0,c1.get_tail(),v1,comp.get_tail());
- }
-};
-
-template
-<
- typename KeyCons1,typename Value1,
- typename KeyCons2, typename Value2,
- typename CompareCons
->
-struct compare_ckey_ckey:
- mpl::if_<
- mpl::or_<
- is_same<KeyCons1,tuples::null_type>,
- is_same<KeyCons2,tuples::null_type>
- >,
- compare_ckey_ckey_terminal<KeyCons1,Value1,KeyCons2,Value2,CompareCons>,
- compare_ckey_ckey_normal<KeyCons1,Value1,KeyCons2,Value2,CompareCons>
- >::type
-{
-};
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename CompareCons
->
-struct compare_ckey_cval; /* fwd decl. */
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename CompareCons
->
-struct compare_ckey_cval_terminal
-{
- static bool compare(
- const KeyCons&,const Value&,const ValCons&,const CompareCons&)
- {
- return false;
- }
-
- static bool compare(
- const ValCons&,const KeyCons&,const Value&,const CompareCons&)
- {
- return false;
- }
-};
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename CompareCons
->
-struct compare_ckey_cval_normal
-{
- static bool compare(
- const KeyCons& c,const Value& v,const ValCons& vc,
- const CompareCons& comp)
- {
- if(comp.get_head()(c.get_head()(v),vc.get_head()))return true;
- if(comp.get_head()(vc.get_head(),c.get_head()(v)))return false;
- return compare_ckey_cval<
- BOOST_DEDUCED_TYPENAME KeyCons::tail_type,Value,
- BOOST_DEDUCED_TYPENAME ValCons::tail_type,
- BOOST_DEDUCED_TYPENAME CompareCons::tail_type
- >::compare(c.get_tail(),v,vc.get_tail(),comp.get_tail());
- }
-
- static bool compare(
- const ValCons& vc,const KeyCons& c,const Value& v,
- const CompareCons& comp)
- {
- if(comp.get_head()(vc.get_head(),c.get_head()(v)))return true;
- if(comp.get_head()(c.get_head()(v),vc.get_head()))return false;
- return compare_ckey_cval<
- BOOST_DEDUCED_TYPENAME KeyCons::tail_type,Value,
- BOOST_DEDUCED_TYPENAME ValCons::tail_type,
- BOOST_DEDUCED_TYPENAME CompareCons::tail_type
- >::compare(vc.get_tail(),c.get_tail(),v,comp.get_tail());
- }
-};
-
-template
-<
- typename KeyCons,typename Value,
- typename ValCons,typename CompareCons
->
-struct compare_ckey_cval:
- mpl::if_<
- mpl::or_<
- is_same<KeyCons,tuples::null_type>,
- is_same<ValCons,tuples::null_type>
- >,
- compare_ckey_cval_terminal<KeyCons,Value,ValCons,CompareCons>,
- compare_ckey_cval_normal<KeyCons,Value,ValCons,CompareCons>
- >::type
-{
-};
-
-template<typename KeyCons,typename Value,typename HashCons>
-struct hash_ckey; /* fwd decl. */
-
-template<typename KeyCons,typename Value,typename HashCons>
-struct hash_ckey_terminal
-{
- static std::size_t hash(
- const KeyCons&,const Value&,const HashCons&,std::size_t carry)
- {
- return carry;
- }
-};
-
-template<typename KeyCons,typename Value,typename HashCons>
-struct hash_ckey_normal
-{
- static std::size_t hash(
- const KeyCons& c,const Value& v,const HashCons& h,std::size_t carry=0)
- {
- /* same hashing formula as boost::hash_combine */
-
- carry^=h.get_head()(c.get_head()(v))+0x9e3779b9+(carry<<6)+(carry>>2);
- return hash_ckey<
- BOOST_DEDUCED_TYPENAME KeyCons::tail_type,Value,
- BOOST_DEDUCED_TYPENAME HashCons::tail_type
- >::hash(c.get_tail(),v,h.get_tail(),carry);
- }
-};
-
-template<typename KeyCons,typename Value,typename HashCons>
-struct hash_ckey:
- mpl::if_<
- is_same<KeyCons,tuples::null_type>,
- hash_ckey_terminal<KeyCons,Value,HashCons>,
- hash_ckey_normal<KeyCons,Value,HashCons>
- >::type
-{
-};
-
-template<typename ValCons,typename HashCons>
-struct hash_cval; /* fwd decl. */
-
-template<typename ValCons,typename HashCons>
-struct hash_cval_terminal
-{
- static std::size_t hash(const ValCons&,const HashCons&,std::size_t carry)
- {
- return carry;
- }
-};
-
-template<typename ValCons,typename HashCons>
-struct hash_cval_normal
-{
- static std::size_t hash(
- const ValCons& vc,const HashCons& h,std::size_t carry=0)
- {
- carry^=h.get_head()(vc.get_head())+0x9e3779b9+(carry<<6)+(carry>>2);
- return hash_cval<
- BOOST_DEDUCED_TYPENAME ValCons::tail_type,
- BOOST_DEDUCED_TYPENAME HashCons::tail_type
- >::hash(vc.get_tail(),h.get_tail(),carry);
- }
-};
-
-template<typename ValCons,typename HashCons>
-struct hash_cval:
- mpl::if_<
- is_same<ValCons,tuples::null_type>,
- hash_cval_terminal<ValCons,HashCons>,
- hash_cval_normal<ValCons,HashCons>
- >::type
-{
-};
-
-} /* namespace multi_index::detail */
-
-/* composite_key_result */
-
-#if defined(BOOST_MSVC)
-#pragma warning(push)
-#pragma warning(disable:4512)
-#endif
-
-template<typename CompositeKey>
-struct composite_key_result
-{
- typedef CompositeKey composite_key_type;
- typedef typename composite_key_type::value_type value_type;
-
- composite_key_result(
- const composite_key_type& composite_key_,const value_type& value_):
- composite_key(composite_key_),value(value_)
- {}
-
- const composite_key_type& composite_key;
- const value_type& value;
-};
-
-#if defined(BOOST_MSVC)
-#pragma warning(pop)
-#endif
-
-/* composite_key */
-
-template<
- typename Value,
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_TEMPLATE_PARM,KeyFromValue)
->
-struct composite_key:
- private tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(KeyFromValue)>
-{
-private:
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(KeyFromValue)> super;
-
-public:
- typedef super key_extractor_tuple;
- typedef Value value_type;
- typedef composite_key_result<composite_key> result_type;
-
- composite_key(
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_CTOR_ARG,KeyFromValue)):
- super(BOOST_MULTI_INDEX_CK_ENUM_PARAMS(k))
- {}
-
- composite_key(const key_extractor_tuple& x):super(x){}
-
- const key_extractor_tuple& key_extractors()const{return *this;}
- key_extractor_tuple& key_extractors(){return *this;}
-
- template<typename ChainedPtr>
-
-#if !defined(BOOST_NO_SFINAE)
- typename disable_if<
- is_convertible<const ChainedPtr&,const value_type&>,result_type>::type
-#else
- result_type
-#endif
-
- operator()(const ChainedPtr& x)const
- {
- return operator()(*x);
- }
-
- result_type operator()(const value_type& x)const
- {
- return result_type(*this,x);
- }
-
- result_type operator()(const reference_wrapper<const value_type>& x)const
- {
- return result_type(*this,x.get());
- }
-
- result_type operator()(const reference_wrapper<value_type>& x)const
- {
- return result_type(*this,x.get());
- }
-};
-
-/* comparison operators */
-
-/* == */
-
-template<typename CompositeKey1,typename CompositeKey2>
-inline bool operator==(
- const composite_key_result<CompositeKey1>& x,
- const composite_key_result<CompositeKey2>& y)
-{
- typedef typename CompositeKey1::key_extractor_tuple key_extractor_tuple1;
- typedef typename CompositeKey1::value_type value_type1;
- typedef typename CompositeKey2::key_extractor_tuple key_extractor_tuple2;
- typedef typename CompositeKey2::value_type value_type2;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple1>::value==
- tuples::length<key_extractor_tuple2>::value);
-
- return detail::equal_ckey_ckey<
- key_extractor_tuple1,value_type1,
- key_extractor_tuple2,value_type2,
- detail::generic_operator_equal_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- y.composite_key.key_extractors(),y.value,
- detail::generic_operator_equal_tuple());
-}
-
-template<
- typename CompositeKey,
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value)
->
-inline bool operator==(
- const composite_key_result<CompositeKey>& x,
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple>::value==
- tuples::length<key_tuple>::value);
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,detail::generic_operator_equal_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- y,detail::generic_operator_equal_tuple());
-}
-
-template
-<
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value),
- typename CompositeKey
->
-inline bool operator==(
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& x,
- const composite_key_result<CompositeKey>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple>::value==
- tuples::length<key_tuple>::value);
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,detail::generic_operator_equal_tuple
- >::compare(
- x,y.composite_key.key_extractors(),
- y.value,detail::generic_operator_equal_tuple());
-}
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)&&\
- !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-template<typename CompositeKey,typename... Values>
-inline bool operator==(
- const composite_key_result<CompositeKey>& x,
- const std::tuple<Values...>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- BOOST_STATIC_ASSERT(
- static_cast<std::size_t>(tuples::length<key_extractor_tuple>::value)==
- std::tuple_size<key_tuple>::value);
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,detail::generic_operator_equal_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- detail::make_cons_stdtuple(y),detail::generic_operator_equal_tuple());
-}
-
-template<typename CompositeKey,typename... Values>
-inline bool operator==(
- const std::tuple<Values...>& x,
- const composite_key_result<CompositeKey>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- BOOST_STATIC_ASSERT(
- static_cast<std::size_t>(tuples::length<key_extractor_tuple>::value)==
- std::tuple_size<key_tuple>::value);
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,detail::generic_operator_equal_tuple
- >::compare(
- detail::make_cons_stdtuple(x),y.composite_key.key_extractors(),
- y.value,detail::generic_operator_equal_tuple());
-}
-#endif
-
-/* < */
-
-template<typename CompositeKey1,typename CompositeKey2>
-inline bool operator<(
- const composite_key_result<CompositeKey1>& x,
- const composite_key_result<CompositeKey2>& y)
-{
- typedef typename CompositeKey1::key_extractor_tuple key_extractor_tuple1;
- typedef typename CompositeKey1::value_type value_type1;
- typedef typename CompositeKey2::key_extractor_tuple key_extractor_tuple2;
- typedef typename CompositeKey2::value_type value_type2;
-
- return detail::compare_ckey_ckey<
- key_extractor_tuple1,value_type1,
- key_extractor_tuple2,value_type2,
- detail::generic_operator_less_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- y.composite_key.key_extractors(),y.value,
- detail::generic_operator_less_tuple());
-}
-
-template
-<
- typename CompositeKey,
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value)
->
-inline bool operator<(
- const composite_key_result<CompositeKey>& x,
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,detail::generic_operator_less_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- y,detail::generic_operator_less_tuple());
-}
-
-template
-<
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value),
- typename CompositeKey
->
-inline bool operator<(
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& x,
- const composite_key_result<CompositeKey>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,detail::generic_operator_less_tuple
- >::compare(
- x,y.composite_key.key_extractors(),
- y.value,detail::generic_operator_less_tuple());
-}
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)&&\
- !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-template<typename CompositeKey,typename... Values>
-inline bool operator<(
- const composite_key_result<CompositeKey>& x,
- const std::tuple<Values...>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,detail::generic_operator_less_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- detail::make_cons_stdtuple(y),detail::generic_operator_less_tuple());
-}
-
-template<typename CompositeKey,typename... Values>
-inline bool operator<(
- const std::tuple<Values...>& x,
- const composite_key_result<CompositeKey>& y)
-{
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,detail::generic_operator_less_tuple
- >::compare(
- detail::make_cons_stdtuple(x),y.composite_key.key_extractors(),
- y.value,detail::generic_operator_less_tuple());
-}
-#endif
-
-/* rest of comparison operators */
-
-#define BOOST_MULTI_INDEX_CK_COMPLETE_COMP_OPS(t1,t2,a1,a2) \
-template<t1,t2> inline bool operator!=(const a1& x,const a2& y) \
-{ \
- return !(x==y); \
-} \
- \
-template<t1,t2> inline bool operator>(const a1& x,const a2& y) \
-{ \
- return y<x; \
-} \
- \
-template<t1,t2> inline bool operator>=(const a1& x,const a2& y) \
-{ \
- return !(x<y); \
-} \
- \
-template<t1,t2> inline bool operator<=(const a1& x,const a2& y) \
-{ \
- return !(y<x); \
-}
-
-BOOST_MULTI_INDEX_CK_COMPLETE_COMP_OPS(
- typename CompositeKey1,
- typename CompositeKey2,
- composite_key_result<CompositeKey1>,
- composite_key_result<CompositeKey2>
-)
-
-BOOST_MULTI_INDEX_CK_COMPLETE_COMP_OPS(
- typename CompositeKey,
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value),
- composite_key_result<CompositeKey>,
- tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>
-)
-
-BOOST_MULTI_INDEX_CK_COMPLETE_COMP_OPS(
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value),
- typename CompositeKey,
- tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>,
- composite_key_result<CompositeKey>
-)
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)&&\
- !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-BOOST_MULTI_INDEX_CK_COMPLETE_COMP_OPS(
- typename CompositeKey,
- typename... Values,
- composite_key_result<CompositeKey>,
- std::tuple<Values...>
-)
-
-BOOST_MULTI_INDEX_CK_COMPLETE_COMP_OPS(
- typename CompositeKey,
- typename... Values,
- std::tuple<Values...>,
- composite_key_result<CompositeKey>
-)
-#endif
-
-/* composite_key_equal_to */
-
-template
-<
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_TEMPLATE_PARM,Pred)
->
-struct composite_key_equal_to:
- private tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Pred)>
-{
-private:
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Pred)> super;
-
-public:
- typedef super key_eq_tuple;
-
- composite_key_equal_to(
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_CTOR_ARG,Pred)):
- super(BOOST_MULTI_INDEX_CK_ENUM_PARAMS(k))
- {}
-
- composite_key_equal_to(const key_eq_tuple& x):super(x){}
-
- const key_eq_tuple& key_eqs()const{return *this;}
- key_eq_tuple& key_eqs(){return *this;}
-
- template<typename CompositeKey1,typename CompositeKey2>
- bool operator()(
- const composite_key_result<CompositeKey1> & x,
- const composite_key_result<CompositeKey2> & y)const
- {
- typedef typename CompositeKey1::key_extractor_tuple key_extractor_tuple1;
- typedef typename CompositeKey1::value_type value_type1;
- typedef typename CompositeKey2::key_extractor_tuple key_extractor_tuple2;
- typedef typename CompositeKey2::value_type value_type2;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple1>::value<=
- tuples::length<key_eq_tuple>::value&&
- tuples::length<key_extractor_tuple1>::value==
- tuples::length<key_extractor_tuple2>::value);
-
- return detail::equal_ckey_ckey<
- key_extractor_tuple1,value_type1,
- key_extractor_tuple2,value_type2,
- key_eq_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- y.composite_key.key_extractors(),y.value,
- key_eqs());
- }
-
- template
- <
- typename CompositeKey,
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value)
- >
- bool operator()(
- const composite_key_result<CompositeKey>& x,
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple>::value<=
- tuples::length<key_eq_tuple>::value&&
- tuples::length<key_extractor_tuple>::value==
- tuples::length<key_tuple>::value);
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,key_eq_tuple
- >::compare(x.composite_key.key_extractors(),x.value,y,key_eqs());
- }
-
- template
- <
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value),
- typename CompositeKey
- >
- bool operator()(
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& x,
- const composite_key_result<CompositeKey>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_tuple>::value<=
- tuples::length<key_eq_tuple>::value&&
- tuples::length<key_tuple>::value==
- tuples::length<key_extractor_tuple>::value);
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,key_eq_tuple
- >::compare(x,y.composite_key.key_extractors(),y.value,key_eqs());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)&&\
- !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template<typename CompositeKey,typename... Values>
- bool operator()(
- const composite_key_result<CompositeKey>& x,
- const std::tuple<Values...>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple>::value<=
- tuples::length<key_eq_tuple>::value&&
- static_cast<std::size_t>(tuples::length<key_extractor_tuple>::value)==
- std::tuple_size<key_tuple>::value);
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,key_eq_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- detail::make_cons_stdtuple(y),key_eqs());
- }
-
- template<typename CompositeKey,typename... Values>
- bool operator()(
- const std::tuple<Values...>& x,
- const composite_key_result<CompositeKey>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- BOOST_STATIC_ASSERT(
- std::tuple_size<key_tuple>::value<=
- static_cast<std::size_t>(tuples::length<key_eq_tuple>::value)&&
- std::tuple_size<key_tuple>::value==
- static_cast<std::size_t>(tuples::length<key_extractor_tuple>::value));
-
- return detail::equal_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,key_eq_tuple
- >::compare(
- detail::make_cons_stdtuple(x),y.composite_key.key_extractors(),
- y.value,key_eqs());
- }
-#endif
-};
-
-/* composite_key_compare */
-
-template
-<
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_TEMPLATE_PARM,Compare)
->
-struct composite_key_compare:
- private tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Compare)>
-{
-private:
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Compare)> super;
-
-public:
- typedef super key_comp_tuple;
-
- composite_key_compare(
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_CTOR_ARG,Compare)):
- super(BOOST_MULTI_INDEX_CK_ENUM_PARAMS(k))
- {}
-
- composite_key_compare(const key_comp_tuple& x):super(x){}
-
- const key_comp_tuple& key_comps()const{return *this;}
- key_comp_tuple& key_comps(){return *this;}
-
- template<typename CompositeKey1,typename CompositeKey2>
- bool operator()(
- const composite_key_result<CompositeKey1> & x,
- const composite_key_result<CompositeKey2> & y)const
- {
- typedef typename CompositeKey1::key_extractor_tuple key_extractor_tuple1;
- typedef typename CompositeKey1::value_type value_type1;
- typedef typename CompositeKey2::key_extractor_tuple key_extractor_tuple2;
- typedef typename CompositeKey2::value_type value_type2;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple1>::value<=
- tuples::length<key_comp_tuple>::value||
- tuples::length<key_extractor_tuple2>::value<=
- tuples::length<key_comp_tuple>::value);
-
- return detail::compare_ckey_ckey<
- key_extractor_tuple1,value_type1,
- key_extractor_tuple2,value_type2,
- key_comp_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- y.composite_key.key_extractors(),y.value,
- key_comps());
- }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
- template<typename CompositeKey,typename Value>
- bool operator()(
- const composite_key_result<CompositeKey>& x,
- const Value& y)const
- {
- return operator()(x,boost::make_tuple(boost::cref(y)));
- }
-#endif
-
- template
- <
- typename CompositeKey,
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value)
- >
- bool operator()(
- const composite_key_result<CompositeKey>& x,
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple>::value<=
- tuples::length<key_comp_tuple>::value||
- tuples::length<key_tuple>::value<=
- tuples::length<key_comp_tuple>::value);
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,key_comp_tuple
- >::compare(x.composite_key.key_extractors(),x.value,y,key_comps());
- }
-
-#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
- template<typename Value,typename CompositeKey>
- bool operator()(
- const Value& x,
- const composite_key_result<CompositeKey>& y)const
- {
- return operator()(boost::make_tuple(boost::cref(x)),y);
- }
-#endif
-
- template
- <
- BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value),
- typename CompositeKey
- >
- bool operator()(
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& x,
- const composite_key_result<CompositeKey>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_tuple>::value<=
- tuples::length<key_comp_tuple>::value||
- tuples::length<key_extractor_tuple>::value<=
- tuples::length<key_comp_tuple>::value);
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- key_tuple,key_comp_tuple
- >::compare(x,y.composite_key.key_extractors(),y.value,key_comps());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)&&\
- !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template<typename CompositeKey,typename... Values>
- bool operator()(
- const composite_key_result<CompositeKey>& x,
- const std::tuple<Values...>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple>::value<=
- tuples::length<key_comp_tuple>::value||
- std::tuple_size<key_tuple>::value<=
- static_cast<std::size_t>(tuples::length<key_comp_tuple>::value));
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,key_comp_tuple
- >::compare(
- x.composite_key.key_extractors(),x.value,
- detail::make_cons_stdtuple(y),key_comps());
- }
-
- template<typename CompositeKey,typename... Values>
- bool operator()(
- const std::tuple<Values...>& x,
- const composite_key_result<CompositeKey>& y)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- BOOST_STATIC_ASSERT(
- std::tuple_size<key_tuple>::value<=
- static_cast<std::size_t>(tuples::length<key_comp_tuple>::value)||
- tuples::length<key_extractor_tuple>::value<=
- tuples::length<key_comp_tuple>::value);
-
- return detail::compare_ckey_cval<
- key_extractor_tuple,value_type,
- cons_key_tuple,key_comp_tuple
- >::compare(
- detail::make_cons_stdtuple(x),y.composite_key.key_extractors(),
- y.value,key_comps());
- }
-#endif
-};
-
-/* composite_key_hash */
-
-template
-<
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_TEMPLATE_PARM,Hash)
->
-struct composite_key_hash:
- private tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Hash)>
-{
-private:
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Hash)> super;
-
-public:
- typedef super key_hasher_tuple;
-
- composite_key_hash(
- BOOST_MULTI_INDEX_CK_ENUM(BOOST_MULTI_INDEX_CK_CTOR_ARG,Hash)):
- super(BOOST_MULTI_INDEX_CK_ENUM_PARAMS(k))
- {}
-
- composite_key_hash(const key_hasher_tuple& x):super(x){}
-
- const key_hasher_tuple& key_hash_functions()const{return *this;}
- key_hasher_tuple& key_hash_functions(){return *this;}
-
- template<typename CompositeKey>
- std::size_t operator()(const composite_key_result<CompositeKey> & x)const
- {
- typedef typename CompositeKey::key_extractor_tuple key_extractor_tuple;
- typedef typename CompositeKey::value_type value_type;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_extractor_tuple>::value==
- tuples::length<key_hasher_tuple>::value);
-
- return detail::hash_ckey<
- key_extractor_tuple,value_type,
- key_hasher_tuple
- >::hash(x.composite_key.key_extractors(),x.value,key_hash_functions());
- }
-
- template<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(typename Value)>
- std::size_t operator()(
- const tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)>& x)const
- {
- typedef tuple<BOOST_MULTI_INDEX_CK_ENUM_PARAMS(Value)> key_tuple;
-
- BOOST_STATIC_ASSERT(
- tuples::length<key_tuple>::value==
- tuples::length<key_hasher_tuple>::value);
-
- return detail::hash_cval<
- key_tuple,key_hasher_tuple
- >::hash(x,key_hash_functions());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE)&&\
- !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template<typename... Values>
- std::size_t operator()(const std::tuple<Values...>& x)const
- {
- typedef std::tuple<Values...> key_tuple;
- typedef typename detail::cons_stdtuple_ctor<
- key_tuple>::result_type cons_key_tuple;
-
- BOOST_STATIC_ASSERT(
- std::tuple_size<key_tuple>::value==
- static_cast<std::size_t>(tuples::length<key_hasher_tuple>::value));
-
- return detail::hash_cval<
- cons_key_tuple,key_hasher_tuple
- >::hash(detail::make_cons_stdtuple(x),key_hash_functions());
- }
-#endif
-};
-
-/* Instantiations of the former functors with "natural" basic components:
- * composite_key_result_equal_to uses std::equal_to of the values.
- * composite_key_result_less uses std::less.
- * composite_key_result_greater uses std::greater.
- * composite_key_result_hash uses boost::hash.
- */
-
-#define BOOST_MULTI_INDEX_CK_RESULT_EQUAL_TO_SUPER \
-composite_key_equal_to< \
- BOOST_MULTI_INDEX_CK_ENUM( \
- BOOST_MULTI_INDEX_CK_APPLY_METAFUNCTION_N, \
- /* the argument is a PP list */ \
- (detail::nth_composite_key_equal_to, \
- (BOOST_DEDUCED_TYPENAME CompositeKeyResult::composite_key_type, \
- BOOST_PP_NIL))) \
- >
-
-template<typename CompositeKeyResult>
-struct composite_key_result_equal_to:
-BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS
-BOOST_MULTI_INDEX_CK_RESULT_EQUAL_TO_SUPER
-{
-private:
- typedef BOOST_MULTI_INDEX_CK_RESULT_EQUAL_TO_SUPER super;
-
-public:
- typedef CompositeKeyResult first_argument_type;
- typedef first_argument_type second_argument_type;
- typedef bool result_type;
-
- using super::operator();
-};
-
-#define BOOST_MULTI_INDEX_CK_RESULT_LESS_SUPER \
-composite_key_compare< \
- BOOST_MULTI_INDEX_CK_ENUM( \
- BOOST_MULTI_INDEX_CK_APPLY_METAFUNCTION_N, \
- /* the argument is a PP list */ \
- (detail::nth_composite_key_less, \
- (BOOST_DEDUCED_TYPENAME CompositeKeyResult::composite_key_type, \
- BOOST_PP_NIL))) \
- >
-
-template<typename CompositeKeyResult>
-struct composite_key_result_less:
-BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS
-BOOST_MULTI_INDEX_CK_RESULT_LESS_SUPER
-{
-private:
- typedef BOOST_MULTI_INDEX_CK_RESULT_LESS_SUPER super;
-
-public:
- typedef CompositeKeyResult first_argument_type;
- typedef first_argument_type second_argument_type;
- typedef bool result_type;
-
- using super::operator();
-};
-
-#define BOOST_MULTI_INDEX_CK_RESULT_GREATER_SUPER \
-composite_key_compare< \
- BOOST_MULTI_INDEX_CK_ENUM( \
- BOOST_MULTI_INDEX_CK_APPLY_METAFUNCTION_N, \
- /* the argument is a PP list */ \
- (detail::nth_composite_key_greater, \
- (BOOST_DEDUCED_TYPENAME CompositeKeyResult::composite_key_type, \
- BOOST_PP_NIL))) \
- >
-
-template<typename CompositeKeyResult>
-struct composite_key_result_greater:
-BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS
-BOOST_MULTI_INDEX_CK_RESULT_GREATER_SUPER
-{
-private:
- typedef BOOST_MULTI_INDEX_CK_RESULT_GREATER_SUPER super;
-
-public:
- typedef CompositeKeyResult first_argument_type;
- typedef first_argument_type second_argument_type;
- typedef bool result_type;
-
- using super::operator();
-};
-
-#define BOOST_MULTI_INDEX_CK_RESULT_HASH_SUPER \
-composite_key_hash< \
- BOOST_MULTI_INDEX_CK_ENUM( \
- BOOST_MULTI_INDEX_CK_APPLY_METAFUNCTION_N, \
- /* the argument is a PP list */ \
- (detail::nth_composite_key_hash, \
- (BOOST_DEDUCED_TYPENAME CompositeKeyResult::composite_key_type, \
- BOOST_PP_NIL))) \
- >
-
-template<typename CompositeKeyResult>
-struct composite_key_result_hash:
-BOOST_MULTI_INDEX_PRIVATE_IF_USING_DECL_FOR_TEMPL_FUNCTIONS
-BOOST_MULTI_INDEX_CK_RESULT_HASH_SUPER
-{
-private:
- typedef BOOST_MULTI_INDEX_CK_RESULT_HASH_SUPER super;
-
-public:
- typedef CompositeKeyResult argument_type;
- typedef std::size_t result_type;
-
- using super::operator();
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-/* Specializations of std::equal_to, std::less, std::greater and boost::hash
- * for composite_key_results enabling interoperation with tuples of values.
- */
-
-namespace std{
-
-template<typename CompositeKey>
-struct equal_to<boost::multi_index::composite_key_result<CompositeKey> >:
- boost::multi_index::composite_key_result_equal_to<
- boost::multi_index::composite_key_result<CompositeKey>
- >
-{
-};
-
-template<typename CompositeKey>
-struct less<boost::multi_index::composite_key_result<CompositeKey> >:
- boost::multi_index::composite_key_result_less<
- boost::multi_index::composite_key_result<CompositeKey>
- >
-{
-};
-
-template<typename CompositeKey>
-struct greater<boost::multi_index::composite_key_result<CompositeKey> >:
- boost::multi_index::composite_key_result_greater<
- boost::multi_index::composite_key_result<CompositeKey>
- >
-{
-};
-
-} /* namespace std */
-
-namespace boost{
-
-template<typename CompositeKey>
-struct hash<boost::multi_index::composite_key_result<CompositeKey> >:
- boost::multi_index::composite_key_result_hash<
- boost::multi_index::composite_key_result<CompositeKey>
- >
-{
-};
-
-} /* namespace boost */
-
-#undef BOOST_MULTI_INDEX_CK_RESULT_HASH_SUPER
-#undef BOOST_MULTI_INDEX_CK_RESULT_GREATER_SUPER
-#undef BOOST_MULTI_INDEX_CK_RESULT_LESS_SUPER
-#undef BOOST_MULTI_INDEX_CK_RESULT_EQUAL_TO_SUPER
-#undef BOOST_MULTI_INDEX_CK_COMPLETE_COMP_OPS
-#undef BOOST_MULTI_INDEX_CK_IDENTITY_ENUM_MACRO
-#undef BOOST_MULTI_INDEX_CK_NTH_COMPOSITE_KEY_FUNCTOR
-#undef BOOST_MULTI_INDEX_CK_APPLY_METAFUNCTION_N
-#undef BOOST_MULTI_INDEX_CK_CTOR_ARG
-#undef BOOST_MULTI_INDEX_CK_TEMPLATE_PARM
-#undef BOOST_MULTI_INDEX_CK_ENUM_PARAMS
-#undef BOOST_MULTI_INDEX_CK_ENUM
-#undef BOOST_MULTI_INDEX_COMPOSITE_KEY_SIZE
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/detail/cons_stdtuple.hpp b/contrib/restricted/boost/boost/multi_index/detail/cons_stdtuple.hpp
deleted file mode 100644
index 855c5e06aa9..00000000000
--- a/contrib/restricted/boost/boost/multi_index/detail/cons_stdtuple.hpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright 2003-2014 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_CONS_STDTUPLE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_CONS_STDTUPLE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/mpl/if.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <tuple>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* std::tuple wrapper providing the cons-based interface of boost::tuple for
- * composite_key interoperability.
- */
-
-template<typename StdTuple,std::size_t N>
-struct cons_stdtuple;
-
-struct cons_stdtuple_ctor_terminal
-{
- typedef boost::tuples::null_type result_type;
-
- template<typename StdTuple>
- static result_type create(const StdTuple&)
- {
- return boost::tuples::null_type();
- }
-};
-
-template<typename StdTuple,std::size_t N>
-struct cons_stdtuple_ctor_normal
-{
- typedef cons_stdtuple<StdTuple,N> result_type;
-
- static result_type create(const StdTuple& t)
- {
- return result_type(t);
- }
-};
-
-template<typename StdTuple,std::size_t N=0>
-struct cons_stdtuple_ctor:
- boost::mpl::if_c<
- N<std::tuple_size<StdTuple>::value,
- cons_stdtuple_ctor_normal<StdTuple,N>,
- cons_stdtuple_ctor_terminal
- >::type
-{};
-
-template<typename StdTuple,std::size_t N>
-struct cons_stdtuple
-{
- typedef typename std::tuple_element<N,StdTuple>::type head_type;
- typedef cons_stdtuple_ctor<StdTuple,N+1> tail_ctor;
- typedef typename tail_ctor::result_type tail_type;
-
- cons_stdtuple(const StdTuple& t_):t(t_){}
-
- const head_type& get_head()const{return std::get<N>(t);}
- tail_type get_tail()const{return tail_ctor::create(t);}
-
- const StdTuple& t;
-};
-
-template<typename StdTuple>
-typename cons_stdtuple_ctor<StdTuple>::result_type
-make_cons_stdtuple(const StdTuple& t)
-{
- return cons_stdtuple_ctor<StdTuple>::create(t);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_loader.hpp b/contrib/restricted/boost/boost/multi_index/detail/rnd_index_loader.hpp
deleted file mode 100644
index 4b00345a6d9..00000000000
--- a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_loader.hpp
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Copyright 2003-2013 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RND_INDEX_LOADER_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_LOADER_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/auto_space.hpp>
-#include <boost/multi_index/detail/rnd_index_ptr_array.hpp>
-#include <boost/noncopyable.hpp>
-#include <cstddef>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* This class implements a serialization rearranger for random access
- * indices. In order to achieve O(n) performance, the following strategy
- * is followed: the nodes of the index are handled as if in a bidirectional
- * list, where the next pointers are stored in the original
- * random_access_index_ptr_array and the prev pointers are stored in
- * an auxiliary array. Rearranging of nodes in such a bidirectional list
- * is constant time. Once all the arrangements are performed (on destruction
- * time) the list is traversed in reverse order and
- * pointers are swapped and set accordingly so that they recover its
- * original semantics ( *(node->up())==node ) while retaining the
- * new order.
- */
-
-template<typename Allocator>
-class random_access_index_loader_base:private noncopyable
-{
-protected:
- typedef random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- Allocator,
- char
- >::type
- > node_impl_type;
- typedef typename node_impl_type::pointer node_impl_pointer;
- typedef random_access_index_ptr_array<Allocator> ptr_array;
-
- random_access_index_loader_base(const Allocator& al_,ptr_array& ptrs_):
- al(al_),
- ptrs(ptrs_),
- header(*ptrs.end()),
- prev_spc(al,0),
- preprocessed(false)
- {}
-
- ~random_access_index_loader_base()
- {
- if(preprocessed)
- {
- node_impl_pointer n=header;
- next(n)=n;
-
- for(std::size_t i=ptrs.size();i--;){
- n=prev(n);
- std::size_t d=position(n);
- if(d!=i){
- node_impl_pointer m=prev(next_at(i));
- std::swap(m->up(),n->up());
- next_at(d)=next_at(i);
- std::swap(prev_at(d),prev_at(i));
- }
- next(n)=n;
- }
- }
- }
-
- void rearrange(node_impl_pointer position_,node_impl_pointer x)
- {
- preprocess(); /* only incur this penalty if rearrange() is ever called */
- if(position_==node_impl_pointer(0))position_=header;
- next(prev(x))=next(x);
- prev(next(x))=prev(x);
- prev(x)=position_;
- next(x)=next(position_);
- next(prev(x))=prev(next(x))=x;
- }
-
-private:
- void preprocess()
- {
- if(!preprocessed){
- /* get space for the auxiliary prev array */
- auto_space<node_impl_pointer,Allocator> tmp(al,ptrs.size()+1);
- prev_spc.swap(tmp);
-
- /* prev_spc elements point to the prev nodes */
- std::rotate_copy(
- &*ptrs.begin(),&*ptrs.end(),&*ptrs.end()+1,&*prev_spc.data());
-
- /* ptrs elements point to the next nodes */
- std::rotate(&*ptrs.begin(),&*ptrs.begin()+1,&*ptrs.end()+1);
-
- preprocessed=true;
- }
- }
-
- std::size_t position(node_impl_pointer x)const
- {
- return (std::size_t)(x->up()-ptrs.begin());
- }
-
- node_impl_pointer& next_at(std::size_t n)const
- {
- return *ptrs.at(n);
- }
-
- node_impl_pointer& prev_at(std::size_t n)const
- {
- return *(prev_spc.data()+n);
- }
-
- node_impl_pointer& next(node_impl_pointer x)const
- {
- return *(x->up());
- }
-
- node_impl_pointer& prev(node_impl_pointer x)const
- {
- return prev_at(position(x));
- }
-
- Allocator al;
- ptr_array& ptrs;
- node_impl_pointer header;
- auto_space<node_impl_pointer,Allocator> prev_spc;
- bool preprocessed;
-};
-
-template<typename Node,typename Allocator>
-class random_access_index_loader:
- private random_access_index_loader_base<Allocator>
-{
- typedef random_access_index_loader_base<Allocator> super;
- typedef typename super::node_impl_pointer node_impl_pointer;
- typedef typename super::ptr_array ptr_array;
-
-public:
- random_access_index_loader(const Allocator& al_,ptr_array& ptrs_):
- super(al_,ptrs_)
- {}
-
- void rearrange(Node* position_,Node *x)
- {
- super::rearrange(
- position_?position_->impl():node_impl_pointer(0),x->impl());
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_node.hpp b/contrib/restricted/boost/boost/multi_index/detail/rnd_index_node.hpp
deleted file mode 100644
index 72d93846a00..00000000000
--- a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_node.hpp
+++ /dev/null
@@ -1,283 +0,0 @@
-/* Copyright 2003-2018 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RND_INDEX_NODE_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_NODE_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/integer/common_factor_rt.hpp>
-#include <boost/multi_index/detail/raw_ptr.hpp>
-#include <cstddef>
-#include <functional>
-#include <memory>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-template<typename Allocator>
-struct random_access_index_node_impl
-{
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,random_access_index_node_impl
- >::type node_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename node_allocator::pointer pointer;
- typedef typename node_allocator::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<node_allocator> node_traits;
- typedef typename node_traits::pointer pointer;
- typedef typename node_traits::const_pointer const_pointer;
-#endif
- typedef typename
- boost::detail::allocator::rebind_to<
- Allocator,pointer
- >::type ptr_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename ptr_allocator::pointer ptr_pointer;
-#else
- typedef std::allocator_traits<ptr_allocator> ptr_traits;
- typedef typename ptr_traits::pointer ptr_pointer;
-#endif
- ptr_pointer& up(){return up_;}
- ptr_pointer up()const{return up_;}
-
- /* interoperability with rnd_node_iterator */
-
- static void increment(pointer& x)
- {
- x=*(x->up()+1);
- }
-
- static void decrement(pointer& x)
- {
- x=*(x->up()-1);
- }
-
- static void advance(pointer& x,std::ptrdiff_t n)
- {
- x=*(x->up()+n);
- }
-
- static std::ptrdiff_t distance(pointer x,pointer y)
- {
- return y->up()-x->up();
- }
-
- /* algorithmic stuff */
-
- static void relocate(ptr_pointer pos,ptr_pointer x)
- {
- pointer n=*x;
- if(x<pos){
- extract(x,pos);
- *(pos-1)=n;
- n->up()=pos-1;
- }
- else{
- while(x!=pos){
- *x=*(x-1);
- (*x)->up()=x;
- --x;
- }
- *pos=n;
- n->up()=pos;
- }
- };
-
- static void relocate(ptr_pointer pos,ptr_pointer first,ptr_pointer last)
- {
- ptr_pointer begin,middle,end;
- if(pos<first){
- begin=pos;
- middle=first;
- end=last;
- }
- else{
- begin=first;
- middle=last;
- end=pos;
- }
-
- std::ptrdiff_t n=end-begin;
- std::ptrdiff_t m=middle-begin;
- std::ptrdiff_t n_m=n-m;
- std::ptrdiff_t p=integer::gcd(n,m);
-
- for(std::ptrdiff_t i=0;i<p;++i){
- pointer tmp=begin[i];
- for(std::ptrdiff_t j=i,k;;){
- if(j<n_m)k=j+m;
- else k=j-n_m;
- if(k==i){
- *(begin+j)=tmp;
- (*(begin+j))->up()=begin+j;
- break;
- }
- else{
- *(begin+j)=*(begin+k);
- (*(begin+j))->up()=begin+j;
- }
-
- if(k<n_m)j=k+m;
- else j=k-n_m;
- if(j==i){
- *(begin+k)=tmp;
- (*(begin+k))->up()=begin+k;
- break;
- }
- else{
- *(begin+k)=*(begin+j);
- (*(begin+k))->up()=begin+k;
- }
- }
- }
- };
-
- static void extract(ptr_pointer x,ptr_pointer pend)
- {
- --pend;
- while(x!=pend){
- *x=*(x+1);
- (*x)->up()=x;
- ++x;
- }
- }
-
- static void transfer(
- ptr_pointer pbegin0,ptr_pointer pend0,ptr_pointer pbegin1)
- {
- while(pbegin0!=pend0){
- *pbegin1=*pbegin0++;
- (*pbegin1)->up()=pbegin1;
- ++pbegin1;
- }
- }
-
- static void reverse(ptr_pointer pbegin,ptr_pointer pend)
- {
- std::ptrdiff_t d=(pend-pbegin)/2;
- for(std::ptrdiff_t i=0;i<d;++i){
- std::swap(*pbegin,*--pend);
- (*pbegin)->up()=pbegin;
- (*pend)->up()=pend;
- ++pbegin;
- }
- }
-
-private:
- ptr_pointer up_;
-};
-
-template<typename Super>
-struct random_access_index_node_trampoline:
- random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- >
-{
- typedef random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- typename Super::allocator_type,
- char
- >::type
- > impl_type;
-};
-
-template<typename Super>
-struct random_access_index_node:
- Super,random_access_index_node_trampoline<Super>
-{
-private:
- typedef random_access_index_node_trampoline<Super> trampoline;
-
-public:
- typedef typename trampoline::impl_type impl_type;
- typedef typename trampoline::pointer impl_pointer;
- typedef typename trampoline::const_pointer const_impl_pointer;
- typedef typename trampoline::ptr_pointer impl_ptr_pointer;
-
- impl_ptr_pointer& up(){return trampoline::up();}
- impl_ptr_pointer up()const{return trampoline::up();}
-
- impl_pointer impl()
- {
- return static_cast<impl_pointer>(
- static_cast<impl_type*>(static_cast<trampoline*>(this)));
- }
-
- const_impl_pointer impl()const
- {
- return static_cast<const_impl_pointer>(
- static_cast<const impl_type*>(static_cast<const trampoline*>(this)));
- }
-
- static random_access_index_node* from_impl(impl_pointer x)
- {
- return
- static_cast<random_access_index_node*>(
- static_cast<trampoline*>(
- raw_ptr<impl_type*>(x)));
- }
-
- static const random_access_index_node* from_impl(const_impl_pointer x)
- {
- return
- static_cast<const random_access_index_node*>(
- static_cast<const trampoline*>(
- raw_ptr<const impl_type*>(x)));
- }
-
- /* interoperability with rnd_node_iterator */
-
- static void increment(random_access_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::increment(xi);
- x=from_impl(xi);
- }
-
- static void decrement(random_access_index_node*& x)
- {
- impl_pointer xi=x->impl();
- trampoline::decrement(xi);
- x=from_impl(xi);
- }
-
- static void advance(random_access_index_node*& x,std::ptrdiff_t n)
- {
- impl_pointer xi=x->impl();
- trampoline::advance(xi,n);
- x=from_impl(xi);
- }
-
- static std::ptrdiff_t distance(
- random_access_index_node* x,random_access_index_node* y)
- {
- return trampoline::distance(x->impl(),y->impl());
- }
-};
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_ops.hpp b/contrib/restricted/boost/boost/multi_index/detail/rnd_index_ops.hpp
deleted file mode 100644
index f5e76e4441f..00000000000
--- a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_ops.hpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/* Copyright 2003-2015 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RND_INDEX_OPS_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_OPS_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/multi_index/detail/rnd_index_ptr_array.hpp>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Common code for random_access_index memfuns having templatized and
- * non-templatized versions.
- */
-
-template<typename Node,typename Allocator,typename Predicate>
-Node* random_access_index_remove(
- random_access_index_ptr_array<Allocator>& ptrs,Predicate pred)
-{
- typedef typename Node::value_type value_type;
- typedef typename Node::impl_ptr_pointer impl_ptr_pointer;
-
- impl_ptr_pointer first=ptrs.begin(),
- res=first,
- last=ptrs.end();
- for(;first!=last;++first){
- if(!pred(
- const_cast<const value_type&>(Node::from_impl(*first)->value()))){
- if(first!=res){
- std::swap(*first,*res);
- (*first)->up()=first;
- (*res)->up()=res;
- }
- ++res;
- }
- }
- return Node::from_impl(*res);
-}
-
-template<typename Node,typename Allocator,class BinaryPredicate>
-Node* random_access_index_unique(
- random_access_index_ptr_array<Allocator>& ptrs,BinaryPredicate binary_pred)
-{
- typedef typename Node::value_type value_type;
- typedef typename Node::impl_ptr_pointer impl_ptr_pointer;
-
- impl_ptr_pointer first=ptrs.begin(),
- res=first,
- last=ptrs.end();
- if(first!=last){
- for(;++first!=last;){
- if(!binary_pred(
- const_cast<const value_type&>(Node::from_impl(*res)->value()),
- const_cast<const value_type&>(Node::from_impl(*first)->value()))){
- ++res;
- if(first!=res){
- std::swap(*first,*res);
- (*first)->up()=first;
- (*res)->up()=res;
- }
- }
- }
- ++res;
- }
- return Node::from_impl(*res);
-}
-
-template<typename Node,typename Allocator,typename Compare>
-void random_access_index_inplace_merge(
- const Allocator& al,
- random_access_index_ptr_array<Allocator>& ptrs,
- BOOST_DEDUCED_TYPENAME Node::impl_ptr_pointer first1,Compare comp)
-{
- typedef typename Node::value_type value_type;
- typedef typename Node::impl_pointer impl_pointer;
- typedef typename Node::impl_ptr_pointer impl_ptr_pointer;
-
- auto_space<impl_pointer,Allocator> spc(al,ptrs.size());
-
- impl_ptr_pointer first0=ptrs.begin(),
- last0=first1,
- last1=ptrs.end(),
- out=spc.data();
- while(first0!=last0&&first1!=last1){
- if(comp(
- const_cast<const value_type&>(Node::from_impl(*first1)->value()),
- const_cast<const value_type&>(Node::from_impl(*first0)->value()))){
- *out++=*first1++;
- }
- else{
- *out++=*first0++;
- }
- }
- std::copy(&*first0,&*last0,&*out);
- std::copy(&*first1,&*last1,&*out);
-
- first1=ptrs.begin();
- out=spc.data();
- while(first1!=last1){
- *first1=*out++;
- (*first1)->up()=first1;
- ++first1;
- }
-}
-
-/* sorting */
-
-/* auxiliary stuff */
-
-template<typename Node,typename Compare>
-struct random_access_index_sort_compare
-{
- typedef typename Node::impl_pointer first_argument_type;
- typedef typename Node::impl_pointer second_argument_type;
- typedef bool result_type;
-
- random_access_index_sort_compare(Compare comp_=Compare()):comp(comp_){}
-
- bool operator()(
- typename Node::impl_pointer x,typename Node::impl_pointer y)const
- {
- typedef typename Node::value_type value_type;
-
- return comp(
- const_cast<const value_type&>(Node::from_impl(x)->value()),
- const_cast<const value_type&>(Node::from_impl(y)->value()));
- }
-
-private:
- Compare comp;
-};
-
-template<typename Node,typename Allocator,class Compare>
-void random_access_index_sort(
- const Allocator& al,
- random_access_index_ptr_array<Allocator>& ptrs,
- Compare comp)
-{
- /* The implementation is extremely simple: an auxiliary
- * array of pointers is sorted using stdlib facilities and
- * then used to rearrange the index. This is suboptimal
- * in space and time, but has some advantages over other
- * possible approaches:
- * - Use std::stable_sort() directly on ptrs using some
- * special iterator in charge of maintaining pointers
- * and up() pointers in sync: we cannot guarantee
- * preservation of the container invariants in the face of
- * exceptions, if, for instance, std::stable_sort throws
- * when ptrs transitorily contains duplicate elements.
- * - Rewrite the internal algorithms of std::stable_sort
- * adapted for this case: besides being a fair amount of
- * work, making a stable sort compatible with Boost.MultiIndex
- * invariants (basically, no duplicates or missing elements
- * even if an exception is thrown) is complicated, error-prone
- * and possibly won't perform much better than the
- * solution adopted.
- */
-
- if(ptrs.size()<=1)return;
-
- typedef typename Node::impl_pointer impl_pointer;
- typedef typename Node::impl_ptr_pointer impl_ptr_pointer;
- typedef random_access_index_sort_compare<
- Node,Compare> ptr_compare;
-
- impl_ptr_pointer first=ptrs.begin();
- impl_ptr_pointer last=ptrs.end();
- auto_space<
- impl_pointer,
- Allocator> spc(al,ptrs.size());
- impl_ptr_pointer buf=spc.data();
-
- std::copy(&*first,&*last,&*buf);
- std::stable_sort(&*buf,&*buf+ptrs.size(),ptr_compare(comp));
-
- while(first!=last){
- *first=*buf++;
- (*first)->up()=first;
- ++first;
- }
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_ptr_array.hpp b/contrib/restricted/boost/boost/multi_index/detail/rnd_index_ptr_array.hpp
deleted file mode 100644
index 795f9cf2742..00000000000
--- a/contrib/restricted/boost/boost/multi_index/detail/rnd_index_ptr_array.hpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/* Copyright 2003-2018 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RND_INDEX_PTR_ARRAY_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_INDEX_PTR_ARRAY_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/detail/allocator_utilities.hpp>
-#include <boost/multi_index/detail/auto_space.hpp>
-#include <boost/multi_index/detail/rnd_index_node.hpp>
-#include <boost/noncopyable.hpp>
-#include <cstddef>
-#include <memory>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* pointer structure for use by random access indices */
-
-template<typename Allocator>
-class random_access_index_ptr_array:private noncopyable
-{
- typedef random_access_index_node_impl<
- typename boost::detail::allocator::rebind_to<
- Allocator,
- char
- >::type
- > node_impl_type;
-
-public:
- typedef typename node_impl_type::pointer value_type;
- typedef typename boost::detail::allocator::rebind_to<
- Allocator,value_type
- >::type value_allocator;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename value_allocator::pointer pointer;
-#else
- typedef typename std::allocator_traits<
- value_allocator
- >::pointer pointer;
-#endif
-
- random_access_index_ptr_array(
- const Allocator& al,value_type end_,std::size_t sz):
- size_(sz),
- capacity_(sz),
- spc(al,capacity_+1)
- {
- *end()=end_;
- end_->up()=end();
- }
-
- std::size_t size()const{return size_;}
- std::size_t capacity()const{return capacity_;}
-
- void room_for_one()
- {
- if(size_==capacity_){
- reserve(capacity_<=10?15:capacity_+capacity_/2);
- }
- }
-
- void reserve(std::size_t c)
- {
- if(c>capacity_)set_capacity(c);
- }
-
- void shrink_to_fit()
- {
- if(capacity_>size_)set_capacity(size_);
- }
-
- pointer begin()const{return ptrs();}
- pointer end()const{return ptrs()+size_;}
- pointer at(std::size_t n)const{return ptrs()+n;}
-
- void push_back(value_type x)
- {
- *(end()+1)=*end();
- (*(end()+1))->up()=end()+1;
- *end()=x;
- (*end())->up()=end();
- ++size_;
- }
-
- void erase(value_type x)
- {
- node_impl_type::extract(x->up(),end()+1);
- --size_;
- }
-
- void clear()
- {
- *begin()=*end();
- (*begin())->up()=begin();
- size_=0;
- }
-
- void swap(random_access_index_ptr_array& x)
- {
- std::swap(size_,x.size_);
- std::swap(capacity_,x.capacity_);
- spc.swap(x.spc);
- }
-
-private:
- std::size_t size_;
- std::size_t capacity_;
- auto_space<value_type,Allocator> spc;
-
- pointer ptrs()const
- {
- return spc.data();
- }
-
- void set_capacity(std::size_t c)
- {
- auto_space<value_type,Allocator> spc1(spc.get_allocator(),c+1);
- node_impl_type::transfer(begin(),end()+1,spc1.data());
- spc.swap(spc1);
- capacity_=c;
- }
-};
-
-template<typename Allocator>
-void swap(
- random_access_index_ptr_array<Allocator>& x,
- random_access_index_ptr_array<Allocator>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/detail/rnd_node_iterator.hpp b/contrib/restricted/boost/boost/multi_index/detail/rnd_node_iterator.hpp
deleted file mode 100644
index 48026132fb7..00000000000
--- a/contrib/restricted/boost/boost/multi_index/detail/rnd_node_iterator.hpp
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright 2003-2014 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RND_NODE_ITERATOR_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RND_NODE_ITERATOR_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/operators.hpp>
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/split_member.hpp>
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Iterator class for node-based indices with random access iterators. */
-
-template<typename Node>
-class rnd_node_iterator:
- public random_access_iterator_helper<
- rnd_node_iterator<Node>,
- typename Node::value_type,
- std::ptrdiff_t,
- const typename Node::value_type*,
- const typename Node::value_type&>
-{
-public:
- /* coverity[uninit_ctor]: suppress warning */
- rnd_node_iterator(){}
- explicit rnd_node_iterator(Node* node_):node(node_){}
-
- const typename Node::value_type& operator*()const
- {
- return node->value();
- }
-
- rnd_node_iterator& operator++()
- {
- Node::increment(node);
- return *this;
- }
-
- rnd_node_iterator& operator--()
- {
- Node::decrement(node);
- return *this;
- }
-
- rnd_node_iterator& operator+=(std::ptrdiff_t n)
- {
- Node::advance(node,n);
- return *this;
- }
-
- rnd_node_iterator& operator-=(std::ptrdiff_t n)
- {
- Node::advance(node,-n);
- return *this;
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* Serialization. As for why the following is public,
- * see explanation in safe_mode_iterator notes in safe_mode.hpp.
- */
-
- BOOST_SERIALIZATION_SPLIT_MEMBER()
-
- typedef typename Node::base_type node_base_type;
-
- template<class Archive>
- void save(Archive& ar,const unsigned int)const
- {
- node_base_type* bnode=node;
- ar<<serialization::make_nvp("pointer",bnode);
- }
-
- template<class Archive>
- void load(Archive& ar,const unsigned int)
- {
- node_base_type* bnode;
- ar>>serialization::make_nvp("pointer",bnode);
- node=static_cast<Node*>(bnode);
- }
-#endif
-
- /* get_node is not to be used by the user */
-
- typedef Node node_type;
-
- Node* get_node()const{return node;}
-
-private:
- Node* node;
-};
-
-template<typename Node>
-bool operator==(
- const rnd_node_iterator<Node>& x,
- const rnd_node_iterator<Node>& y)
-{
- return x.get_node()==y.get_node();
-}
-
-template<typename Node>
-bool operator<(
- const rnd_node_iterator<Node>& x,
- const rnd_node_iterator<Node>& y)
-{
- return Node::distance(x.get_node(),y.get_node())>0;
-}
-
-template<typename Node>
-std::ptrdiff_t operator-(
- const rnd_node_iterator<Node>& x,
- const rnd_node_iterator<Node>& y)
-{
- return Node::distance(y.get_node(),x.get_node());
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/detail/rnk_index_ops.hpp b/contrib/restricted/boost/boost/multi_index/detail/rnk_index_ops.hpp
deleted file mode 100644
index fb233cf4973..00000000000
--- a/contrib/restricted/boost/boost/multi_index/detail/rnk_index_ops.hpp
+++ /dev/null
@@ -1,300 +0,0 @@
-/* Copyright 2003-2017 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_DETAIL_RNK_INDEX_OPS_HPP
-#define BOOST_MULTI_INDEX_DETAIL_RNK_INDEX_OPS_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/mpl/and.hpp>
-#include <boost/multi_index/detail/promotes_arg.hpp>
-#include <cstddef>
-#include <utility>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* Common code for ranked_index memfuns having templatized and
- * non-templatized versions.
- */
-
-template<typename Pointer>
-inline std::size_t ranked_node_size(Pointer x)
-{
- return x!=Pointer(0)?x->size:0;
-}
-
-template<typename Pointer>
-inline Pointer ranked_index_nth(std::size_t n,Pointer end_)
-{
- Pointer top=end_->parent();
- if(top==Pointer(0)||n>=top->size)return end_;
-
- for(;;){
- std::size_t s=ranked_node_size(top->left());
- if(n==s)return top;
- if(n<s)top=top->left();
- else{
- top=top->right();
- n-=s+1;
- }
- }
-}
-
-template<typename Pointer>
-inline std::size_t ranked_index_rank(Pointer x,Pointer end_)
-{
- Pointer top=end_->parent();
- if(top==Pointer(0))return 0;
- if(x==end_)return top->size;
-
- std::size_t s=ranked_node_size(x->left());
- while(x!=top){
- Pointer z=x->parent();
- if(x==z->right()){
- s+=ranked_node_size(z->left())+1;
- }
- x=z;
- }
- return s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_find_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_find_rank(
- top,y,key,x,comp,
- mpl::and_<
- promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
- promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::size_t ranked_index_find_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_find_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_find_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return 0;
-
- std::size_t s=top->impl()->size,
- s0=s;
- Node* y0=y;
-
- do{
- if(!comp(key(top->value()),x)){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else top=Node::from_impl(top->right());
- }while(top);
-
- return (y==y0||comp(x,key(y->value())))?s0:s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_lower_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_lower_bound_rank(
- top,y,key,x,comp,
- promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey>());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::size_t ranked_index_lower_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_lower_bound_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_lower_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(!comp(key(top->value()),x)){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else top=Node::from_impl(top->right());
- }while(top);
-
- return s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_upper_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_upper_bound_rank(
- top,y,key,x,comp,
- promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::size_t ranked_index_upper_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_upper_bound_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::size_t ranked_index_upper_bound_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(comp(x,key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else top=Node::from_impl(top->right());
- }while(top);
-
- return s;
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::pair<std::size_t,std::size_t> ranked_index_equal_range_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp)
-{
- typedef typename KeyFromValue::result_type key_type;
-
- return ranked_index_equal_range_rank(
- top,y,key,x,comp,
- mpl::and_<
- promotes_1st_arg<CompatibleCompare,CompatibleKey,key_type>,
- promotes_2nd_arg<CompatibleCompare,key_type,CompatibleKey> >());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleCompare
->
-inline std::pair<std::size_t,std::size_t> ranked_index_equal_range_rank(
- Node* top,Node* y,const KeyFromValue& key,
- const BOOST_DEDUCED_TYPENAME KeyFromValue::result_type& x,
- const CompatibleCompare& comp,mpl::true_)
-{
- return ranked_index_equal_range_rank(top,y,key,x,comp,mpl::false_());
-}
-
-template<
- typename Node,typename KeyFromValue,
- typename CompatibleKey,typename CompatibleCompare
->
-inline std::pair<std::size_t,std::size_t> ranked_index_equal_range_rank(
- Node* top,Node* y,const KeyFromValue& key,const CompatibleKey& x,
- const CompatibleCompare& comp,mpl::false_)
-{
- if(!top)return std::pair<std::size_t,std::size_t>(0,0);
-
- std::size_t s=top->impl()->size;
-
- do{
- if(comp(key(top->value()),x)){
- top=Node::from_impl(top->right());
- }
- else if(comp(x,key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=Node::from_impl(top->left());
- }
- else{
- return std::pair<std::size_t,std::size_t>(
- s-top->impl()->size+
- ranked_index_lower_bound_rank(
- Node::from_impl(top->left()),top,key,x,comp,mpl::false_()),
- s-ranked_node_size(top->right())+
- ranked_index_upper_bound_rank(
- Node::from_impl(top->right()),y,key,x,comp,mpl::false_()));
- }
- }while(top);
-
- return std::pair<std::size_t,std::size_t>(s,s);
-}
-
-} /* namespace multi_index::detail */
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/global_fun.hpp b/contrib/restricted/boost/boost/multi_index/global_fun.hpp
deleted file mode 100644
index 2c13769100c..00000000000
--- a/contrib/restricted/boost/boost/multi_index/global_fun.hpp
+++ /dev/null
@@ -1,185 +0,0 @@
-/* Copyright 2003-2015 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_GLOBAL_FUN_HPP
-#define BOOST_MULTI_INDEX_GLOBAL_FUN_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/detail/workaround.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/utility/enable_if.hpp>
-
-#if !defined(BOOST_NO_SFINAE)
-#include <boost/type_traits/is_convertible.hpp>
-#endif
-
-namespace boost{
-
-template<class T> class reference_wrapper; /* fwd decl. */
-
-namespace multi_index{
-
-namespace detail{
-
-/* global_fun is a read-only key extractor from Value based on a given global
- * (or static member) function with signature:
- *
- * Type f([const] Value [&]);
- *
- * Additionally, global_fun and const_global_fun are overloaded to support
- * referece_wrappers of Value and "chained pointers" to Value's. By chained
- * pointer to T we mean a type P such that, given a p of Type P
- * *...n...*x is convertible to T&, for some n>=1.
- * Examples of chained pointers are raw and smart pointers, iterators and
- * arbitrary combinations of these (vg. T** or unique_ptr<T*>.)
- */
-
-template<class Value,typename Type,Type (*PtrToFunction)(Value)>
-struct const_ref_global_fun_base
-{
- typedef typename remove_reference<Type>::type result_type;
-
- template<typename ChainedPtr>
-
-#if !defined(BOOST_NO_SFINAE)
- typename disable_if<
- is_convertible<const ChainedPtr&,Value>,Type>::type
-#else
- Type
-#endif
-
- operator()(const ChainedPtr& x)const
- {
- return operator()(*x);
- }
-
- Type operator()(Value x)const
- {
- return PtrToFunction(x);
- }
-
- Type operator()(
- const reference_wrapper<
- typename remove_reference<Value>::type>& x)const
- {
- return operator()(x.get());
- }
-
- Type operator()(
- const reference_wrapper<
- typename remove_const<
- typename remove_reference<Value>::type>::type>& x
-
-#if BOOST_WORKAROUND(BOOST_MSVC,==1310)
-/* http://lists.boost.org/Archives/boost/2015/10/226135.php */
- ,int=0
-#endif
-
- )const
- {
- return operator()(x.get());
- }
-};
-
-template<class Value,typename Type,Type (*PtrToFunction)(Value)>
-struct non_const_ref_global_fun_base
-{
- typedef typename remove_reference<Type>::type result_type;
-
- template<typename ChainedPtr>
-
-#if !defined(BOOST_NO_SFINAE)
- typename disable_if<
- is_convertible<ChainedPtr&,Value>,Type>::type
-#else
- Type
-#endif
-
- operator()(const ChainedPtr& x)const
- {
- return operator()(*x);
- }
-
- Type operator()(Value x)const
- {
- return PtrToFunction(x);
- }
-
- Type operator()(
- const reference_wrapper<
- typename remove_reference<Value>::type>& x)const
- {
- return operator()(x.get());
- }
-};
-
-template<class Value,typename Type,Type (*PtrToFunction)(Value)>
-struct non_ref_global_fun_base
-{
- typedef typename remove_reference<Type>::type result_type;
-
- template<typename ChainedPtr>
-
-#if !defined(BOOST_NO_SFINAE)
- typename disable_if<
- is_convertible<const ChainedPtr&,const Value&>,Type>::type
-#else
- Type
-#endif
-
- operator()(const ChainedPtr& x)const
- {
- return operator()(*x);
- }
-
- Type operator()(const Value& x)const
- {
- return PtrToFunction(x);
- }
-
- Type operator()(const reference_wrapper<const Value>& x)const
- {
- return operator()(x.get());
- }
-
- Type operator()(
- const reference_wrapper<typename remove_const<Value>::type>& x)const
- {
- return operator()(x.get());
- }
-};
-
-} /* namespace multi_index::detail */
-
-template<class Value,typename Type,Type (*PtrToFunction)(Value)>
-struct global_fun:
- mpl::if_c<
- is_reference<Value>::value,
- typename mpl::if_c<
- is_const<typename remove_reference<Value>::type>::value,
- detail::const_ref_global_fun_base<Value,Type,PtrToFunction>,
- detail::non_const_ref_global_fun_base<Value,Type,PtrToFunction>
- >::type,
- detail::non_ref_global_fun_base<Value,Type,PtrToFunction>
- >::type
-{
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/key_extractors.hpp b/contrib/restricted/boost/boost/multi_index/key_extractors.hpp
deleted file mode 100644
index 60179ba2339..00000000000
--- a/contrib/restricted/boost/boost/multi_index/key_extractors.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Copyright 2003-2013 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_KEY_EXTRACTORS_HPP
-#define BOOST_MULTI_INDEX_KEY_EXTRACTORS_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/multi_index/composite_key.hpp>
-#include <boost/multi_index/identity.hpp>
-#include <boost/multi_index/global_fun.hpp>
-#include <boost/multi_index/member.hpp>
-#include <boost/multi_index/mem_fun.hpp>
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/random_access_index.hpp b/contrib/restricted/boost/boost/multi_index/random_access_index.hpp
deleted file mode 100644
index 9db54380699..00000000000
--- a/contrib/restricted/boost/boost/multi_index/random_access_index.hpp
+++ /dev/null
@@ -1,1185 +0,0 @@
-/* Copyright 2003-2018 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_RANDOM_ACCESS_INDEX_HPP
-#define BOOST_MULTI_INDEX_RANDOM_ACCESS_INDEX_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <algorithm>
-#include <boost/bind.hpp>
-#include <boost/call_traits.hpp>
-#include <boost/core/addressof.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/foreach_fwd.hpp>
-#include <boost/iterator/reverse_iterator.hpp>
-#include <boost/move/core.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/push_front.hpp>
-#include <boost/multi_index/detail/access_specifier.hpp>
-#include <boost/multi_index/detail/do_not_copy_elements_tag.hpp>
-#include <boost/multi_index/detail/index_node_base.hpp>
-#include <boost/multi_index/detail/rnd_node_iterator.hpp>
-#include <boost/multi_index/detail/rnd_index_node.hpp>
-#include <boost/multi_index/detail/rnd_index_ops.hpp>
-#include <boost/multi_index/detail/rnd_index_ptr_array.hpp>
-#include <boost/multi_index/detail/safe_mode.hpp>
-#include <boost/multi_index/detail/scope_guard.hpp>
-#include <boost/multi_index/detail/vartempl_support.hpp>
-#include <boost/multi_index/random_access_index_fwd.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <cstddef>
-#include <functional>
-#include <stdexcept>
-#include <utility>
-#include <memory>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include<initializer_list>
-#endif
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
-#include <boost/multi_index/detail/rnd_index_loader.hpp>
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x) \
- detail::scope_guard BOOST_JOIN(check_invariant_,__LINE__)= \
- detail::make_obj_guard(x,&random_access_index::check_invariant_); \
- BOOST_JOIN(check_invariant_,__LINE__).touch();
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT \
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(*this)
-#else
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x)
-#define BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT
-#endif
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* random_access_index adds a layer of random access indexing
- * to a given Super
- */
-
-template<typename SuperMeta,typename TagList>
-class random_access_index:
- BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS SuperMeta::type
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- ,public safe_mode::safe_container<
- random_access_index<SuperMeta,TagList> >
-#endif
-
-{
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-/* The "ISO C++ Template Parser" option in CW8.3 has a problem with the
- * lifetime of const references bound to temporaries --precisely what
- * scopeguards are.
- */
-
-#pragma parse_mfunc_templ off
-#endif
-
- typedef typename SuperMeta::type super;
-
-protected:
- typedef random_access_index_node<
- typename super::node_type> node_type;
-
-private:
- typedef typename node_type::impl_type node_impl_type;
- typedef random_access_index_ptr_array<
- typename super::final_allocator_type> ptr_array;
- typedef typename ptr_array::pointer node_impl_ptr_pointer;
-
-public:
- /* types */
-
- typedef typename node_type::value_type value_type;
- typedef tuples::null_type ctor_args;
- typedef typename super::final_allocator_type allocator_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::reference reference;
- typedef typename allocator_type::const_reference const_reference;
-#else
- typedef value_type& reference;
- typedef const value_type& const_reference;
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_iterator<
- rnd_node_iterator<node_type>,
- random_access_index> iterator;
-#else
- typedef rnd_node_iterator<node_type> iterator;
-#endif
-
- typedef iterator const_iterator;
-
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::pointer pointer;
- typedef typename allocator_type::const_pointer const_pointer;
-#else
- typedef std::allocator_traits<allocator_type> allocator_traits;
- typedef typename allocator_traits::pointer pointer;
- typedef typename allocator_traits::const_pointer const_pointer;
-#endif
- typedef typename
- boost::reverse_iterator<iterator> reverse_iterator;
- typedef typename
- boost::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef TagList tag_list;
-
-protected:
- typedef typename super::final_node_type final_node_type;
- typedef tuples::cons<
- ctor_args,
- typename super::ctor_args_list> ctor_args_list;
- typedef typename mpl::push_front<
- typename super::index_type_list,
- random_access_index>::type index_type_list;
- typedef typename mpl::push_front<
- typename super::iterator_type_list,
- iterator>::type iterator_type_list;
- typedef typename mpl::push_front<
- typename super::const_iterator_type_list,
- const_iterator>::type const_iterator_type_list;
- typedef typename super::copy_map_type copy_map_type;
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- typedef typename super::index_saver_type index_saver_type;
- typedef typename super::index_loader_type index_loader_type;
-#endif
-
-private:
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- typedef safe_mode::safe_container<
- random_access_index> safe_super;
-#endif
-
- typedef typename call_traits<
- value_type>::param_type value_param_type;
-
- /* Needed to avoid commas in BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL
- * expansion.
- */
-
- typedef std::pair<iterator,bool> emplace_return_type;
-
-public:
-
- /* construct/copy/destroy
- * Default and copy ctors are in the protected section as indices are
- * not supposed to be created on their own. No range ctor either.
- */
-
- random_access_index<SuperMeta,TagList>& operator=(
- const random_access_index<SuperMeta,TagList>& x)
- {
- this->final()=x.final();
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- random_access_index<SuperMeta,TagList>& operator=(
- std::initializer_list<value_type> list)
- {
- this->final()=list;
- return *this;
- }
-#endif
-
- template <class InputIterator>
- void assign(InputIterator first,InputIterator last)
- {
- assign_iter(first,last,mpl::not_<is_integral<InputIterator> >());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void assign(std::initializer_list<value_type> list)
- {
- assign(list.begin(),list.end());
- }
-#endif
-
- void assign(size_type n,value_param_type value)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- clear();
- for(size_type i=0;i<n;++i)push_back(value);
- }
-
- allocator_type get_allocator()const BOOST_NOEXCEPT
- {
- return this->final().get_allocator();
- }
-
- /* iterators */
-
- iterator begin()BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(*ptrs.begin()));}
- const_iterator begin()const BOOST_NOEXCEPT
- {return make_iterator(node_type::from_impl(*ptrs.begin()));}
- iterator
- end()BOOST_NOEXCEPT{return make_iterator(header());}
- const_iterator
- end()const BOOST_NOEXCEPT{return make_iterator(header());}
- reverse_iterator
- rbegin()BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- const_reverse_iterator
- rbegin()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(end());}
- reverse_iterator
- rend()BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_reverse_iterator
- rend()const BOOST_NOEXCEPT{return boost::make_reverse_iterator(begin());}
- const_iterator
- cbegin()const BOOST_NOEXCEPT{return begin();}
- const_iterator
- cend()const BOOST_NOEXCEPT{return end();}
- const_reverse_iterator
- crbegin()const BOOST_NOEXCEPT{return rbegin();}
- const_reverse_iterator
- crend()const BOOST_NOEXCEPT{return rend();}
-
- iterator iterator_to(const value_type& x)
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- const_iterator iterator_to(const value_type& x)const
- {
- return make_iterator(node_from_value<node_type>(boost::addressof(x)));
- }
-
- /* capacity */
-
- bool empty()const BOOST_NOEXCEPT{return this->final_empty_();}
- size_type size()const BOOST_NOEXCEPT{return this->final_size_();}
- size_type max_size()const BOOST_NOEXCEPT{return this->final_max_size_();}
- size_type capacity()const BOOST_NOEXCEPT{return ptrs.capacity();}
-
- void reserve(size_type n)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- ptrs.reserve(n);
- }
-
- void shrink_to_fit()
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- ptrs.shrink_to_fit();
- }
-
- void resize(size_type n)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(n>size())
- for(size_type m=n-size();m--;)
- this->final_emplace_(BOOST_MULTI_INDEX_NULL_PARAM_PACK);
- else if(n<size())erase(begin()+n,end());
- }
-
- void resize(size_type n,value_param_type x)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(n>size())for(size_type m=n-size();m--;)this->final_insert_(x);
- else if(n<size())erase(begin()+n,end());
- }
-
- /* access: no non-const versions provided as random_access_index
- * handles const elements.
- */
-
- const_reference operator[](size_type n)const
- {
- BOOST_MULTI_INDEX_SAFE_MODE_ASSERT(n<size(),safe_mode::out_of_bounds);
- return node_type::from_impl(*ptrs.at(n))->value();
- }
-
- const_reference at(size_type n)const
- {
- if(n>=size())throw_exception(std::out_of_range("random access index"));
- return node_type::from_impl(*ptrs.at(n))->value();
- }
-
- const_reference front()const{return operator[](0);}
- const_reference back()const{return operator[](size()-1);}
-
- /* modifiers */
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace_front,emplace_front_impl)
-
- std::pair<iterator,bool> push_front(const value_type& x)
- {return insert(begin(),x);}
- std::pair<iterator,bool> push_front(BOOST_RV_REF(value_type) x)
- {return insert(begin(),boost::move(x));}
- void pop_front(){erase(begin());}
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL(
- emplace_return_type,emplace_back,emplace_back_impl)
-
- std::pair<iterator,bool> push_back(const value_type& x)
- {return insert(end(),x);}
- std::pair<iterator,bool> push_back(BOOST_RV_REF(value_type) x)
- {return insert(end(),boost::move(x));}
- void pop_back(){erase(--end());}
-
- BOOST_MULTI_INDEX_OVERLOADS_TO_VARTEMPL_EXTRA_ARG(
- emplace_return_type,emplace,emplace_impl,iterator,position)
-
- std::pair<iterator,bool> insert(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_(x);
- if(p.second&&position.get_node()!=header()){
- relocate(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- std::pair<iterator,bool> insert(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=this->final_insert_rv_(x);
- if(p.second&&position.get_node()!=header()){
- relocate(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- void insert(iterator position,size_type n,value_param_type x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=0;
- BOOST_TRY{
- while(n--){
- if(push_back(x).second)++s;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-s,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-s,end());
- }
-
- template<typename InputIterator>
- void insert(iterator position,InputIterator first,InputIterator last)
- {
- insert_iter(position,first,last,mpl::not_<is_integral<InputIterator> >());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- void insert(iterator position,std::initializer_list<value_type> list)
- {
- insert(position,list.begin(),list.end());
- }
-#endif
-
- iterator erase(iterator position)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- this->final_erase_(static_cast<final_node_type*>(position++.get_node()));
- return position;
- }
-
- iterator erase(iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=last-first;
- relocate(end(),first,last);
- while(n--)pop_back();
- return last;
- }
-
- bool replace(iterator position,const value_type& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- return this->final_replace_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- bool replace(iterator position,BOOST_RV_REF(value_type) x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- return this->final_replace_rv_(
- x,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier>
- bool modify(iterator position,Modifier mod)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,static_cast<final_node_type*>(position.get_node()));
- }
-
- template<typename Modifier,typename Rollback>
- bool modify(iterator position,Modifier mod,Rollback back_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer on safe mode code chokes if this
- * this is not added. Left it for all compilers as it does no
- * harm.
- */
-
- position.detach();
-#endif
-
- return this->final_modify_(
- mod,back_,static_cast<final_node_type*>(position.get_node()));
- }
-
- void swap(random_access_index<SuperMeta,TagList>& x)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF(x);
- this->final_swap_(x.final());
- }
-
- void clear()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- this->final_clear_();
- }
-
- /* list operations */
-
- void splice(iterator position,random_access_index<SuperMeta,TagList>& x)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_DIFFERENT_CONTAINER(*this,x);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- iterator first=x.begin(),last=x.end();
- size_type n=0;
- BOOST_TRY{
- while(first!=last){
- if(push_back(*first).second){
- first=x.erase(first);
- ++n;
- }
- else ++first;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-n,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-n,end());
- }
-
- void splice(
- iterator position,random_access_index<SuperMeta,TagList>& x,iterator i)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,x);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(&x==this)relocate(position,i);
- else{
- if(insert(position,*i).second){
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- /* MSVC++ 6.0 optimizer has a hard time with safe mode, and the following
- * workaround is needed. Left it for all compilers as it does no
- * harm.
- */
- i.detach();
- x.erase(x.make_iterator(i.get_node()));
-#else
- x.erase(i);
-#endif
-
- }
- }
- }
-
- void splice(
- iterator position,random_access_index<SuperMeta,TagList>& x,
- iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,x);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,x);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(&x==this)relocate(position,first,last);
- else{
- size_type n=0;
- BOOST_TRY{
- while(first!=last){
- if(push_back(*first).second){
- first=x.erase(first);
- ++n;
- }
- else ++first;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-n,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-n,end());
- }
- }
-
- void remove(value_param_type value)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(
- random_access_index_remove<node_type>(
- ptrs,
- ::boost::bind(std::equal_to<value_type>(),::boost::arg<1>(),value)));
- while(n--)pop_back();
- }
-
- template<typename Predicate>
- void remove_if(Predicate pred)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(random_access_index_remove<node_type>(ptrs,pred));
- while(n--)pop_back();
- }
-
- void unique()
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(
- random_access_index_unique<node_type>(
- ptrs,std::equal_to<value_type>()));
- while(n--)pop_back();
- }
-
- template <class BinaryPredicate>
- void unique(BinaryPredicate binary_pred)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- difference_type n=
- end()-make_iterator(
- random_access_index_unique<node_type>(ptrs,binary_pred));
- while(n--)pop_back();
- }
-
- void merge(random_access_index<SuperMeta,TagList>& x)
- {
- if(this!=&x){
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=size();
- splice(end(),x);
- random_access_index_inplace_merge<node_type>(
- get_allocator(),ptrs,ptrs.at(s),std::less<value_type>());
- }
- }
-
- template <typename Compare>
- void merge(random_access_index<SuperMeta,TagList>& x,Compare comp)
- {
- if(this!=&x){
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=size();
- splice(end(),x);
- random_access_index_inplace_merge<node_type>(
- get_allocator(),ptrs,ptrs.at(s),comp);
- }
- }
-
- void sort()
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- random_access_index_sort<node_type>(
- get_allocator(),ptrs,std::less<value_type>());
- }
-
- template <typename Compare>
- void sort(Compare comp)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- random_access_index_sort<node_type>(
- get_allocator(),ptrs,comp);
- }
-
- void reverse()BOOST_NOEXCEPT
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- node_impl_type::reverse(ptrs.begin(),ptrs.end());
- }
-
- /* rearrange operations */
-
- void relocate(iterator position,iterator i)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_DEREFERENCEABLE_ITERATOR(i);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(i,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(position!=i)relocate(position.get_node(),i.get_node());
- }
-
- void relocate(iterator position,iterator first,iterator last)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(first);
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(last);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(first,*this);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(last,*this);
- BOOST_MULTI_INDEX_CHECK_VALID_RANGE(first,last);
- BOOST_MULTI_INDEX_CHECK_OUTSIDE_RANGE(position,first,last);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- if(position!=last)relocate(
- position.get_node(),first.get_node(),last.get_node());
- }
-
- template<typename InputIterator>
- void rearrange(InputIterator first)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- for(node_impl_ptr_pointer p0=ptrs.begin(),p0_end=ptrs.end();
- p0!=p0_end;++first,++p0){
- const value_type& v1=*first;
- node_impl_ptr_pointer p1=node_from_value<node_type>(&v1)->up();
-
- std::swap(*p0,*p1);
- (*p0)->up()=p0;
- (*p1)->up()=p1;
- }
- }
-
-BOOST_MULTI_INDEX_PROTECTED_IF_MEMBER_TEMPLATE_FRIENDS:
- random_access_index(
- const ctor_args_list& args_list,const allocator_type& al):
- super(args_list.get_tail(),al),
- ptrs(al,header()->impl(),0)
- {
- }
-
- random_access_index(const random_access_index<SuperMeta,TagList>& x):
- super(x),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- ptrs(x.get_allocator(),header()->impl(),x.size())
- {
- /* The actual copying takes place in subsequent call to copy_().
- */
- }
-
- random_access_index(
- const random_access_index<SuperMeta,TagList>& x,do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag()),
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super(),
-#endif
-
- ptrs(x.get_allocator(),header()->impl(),0)
- {
- }
-
- ~random_access_index()
- {
- /* the container is guaranteed to be empty by now */
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- iterator make_iterator(node_type* node){return iterator(node,this);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node,const_cast<random_access_index*>(this));}
-#else
- iterator make_iterator(node_type* node){return iterator(node);}
- const_iterator make_iterator(node_type* node)const
- {return const_iterator(node);}
-#endif
-
- void copy_(
- const random_access_index<SuperMeta,TagList>& x,const copy_map_type& map)
- {
- for(node_impl_ptr_pointer begin_org=x.ptrs.begin(),
- begin_cpy=ptrs.begin(),
- end_org=x.ptrs.end();
- begin_org!=end_org;++begin_org,++begin_cpy){
- *begin_cpy=
- static_cast<node_type*>(
- map.find(
- static_cast<final_node_type*>(
- node_type::from_impl(*begin_org))))->impl();
- (*begin_cpy)->up()=begin_cpy;
- }
-
- super::copy_(x,map);
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,final_node_type*& x,Variant variant)
- {
- ptrs.room_for_one();
- final_node_type* res=super::insert_(v,x,variant);
- if(res==x)ptrs.push_back(static_cast<node_type*>(x)->impl());
- return res;
- }
-
- template<typename Variant>
- final_node_type* insert_(
- value_param_type v,node_type* position,final_node_type*& x,Variant variant)
- {
- ptrs.room_for_one();
- final_node_type* res=super::insert_(v,position,x,variant);
- if(res==x)ptrs.push_back(static_cast<node_type*>(x)->impl());
- return res;
- }
-
- void erase_(node_type* x)
- {
- ptrs.erase(x->impl());
- super::erase_(x);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
- }
-
- void delete_all_nodes_()
- {
- for(node_impl_ptr_pointer x=ptrs.begin(),x_end=ptrs.end();x!=x_end;++x){
- this->final_delete_node_(
- static_cast<final_node_type*>(node_type::from_impl(*x)));
- }
- }
-
- void clear_()
- {
- super::clear_();
- ptrs.clear();
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::detach_dereferenceable_iterators();
-#endif
- }
-
- void swap_(random_access_index<SuperMeta,TagList>& x)
- {
- ptrs.swap(x.ptrs);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_(x);
- }
-
- void swap_elements_(random_access_index<SuperMeta,TagList>& x)
- {
- ptrs.swap(x.ptrs);
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- safe_super::swap(x);
-#endif
-
- super::swap_elements_(x);
- }
-
- template<typename Variant>
- bool replace_(value_param_type v,node_type* x,Variant variant)
- {
- return super::replace_(v,x,variant);
- }
-
- bool modify_(node_type* x)
- {
- BOOST_TRY{
- if(!super::modify_(x)){
- ptrs.erase(x->impl());
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- return false;
- }
- else return true;
- }
- BOOST_CATCH(...){
- ptrs.erase(x->impl());
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- detach_iterators(x);
-#endif
-
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- bool modify_rollback_(node_type* x)
- {
- return super::modify_rollback_(x);
- }
-
- bool check_rollback_(node_type* x)const
- {
- return super::check_rollback_(x);
- }
-
-#if !defined(BOOST_MULTI_INDEX_DISABLE_SERIALIZATION)
- /* serialization */
-
- template<typename Archive>
- void save_(
- Archive& ar,const unsigned int version,const index_saver_type& sm)const
- {
- sm.save(begin(),end(),ar,version);
- super::save_(ar,version,sm);
- }
-
- template<typename Archive>
- void load_(
- Archive& ar,const unsigned int version,const index_loader_type& lm)
- {
- {
- typedef random_access_index_loader<node_type,allocator_type> loader;
-
- loader ld(get_allocator(),ptrs);
- lm.load(
- ::boost::bind(
- &loader::rearrange,&ld,::boost::arg<1>(),::boost::arg<2>()),
- ar,version);
- } /* exit scope so that ld frees its resources */
- super::load_(ar,version,lm);
- }
-#endif
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- bool invariant_()const
- {
- if(size()>capacity())return false;
- if(size()==0||begin()==end()){
- if(size()!=0||begin()!=end())return false;
- }
- else{
- size_type s=0;
- for(const_iterator it=begin(),it_end=end();;++it,++s){
- if(*(it.get_node()->up())!=it.get_node()->impl())return false;
- if(it==it_end)break;
- }
- if(s!=size())return false;
- }
-
- return super::invariant_();
- }
-
- /* This forwarding function eases things for the boost::mem_fn construct
- * in BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT. Actually,
- * final_check_invariant is already an inherited member function of index.
- */
- void check_invariant_()const{this->final_check_invariant_();}
-#endif
-
-private:
- node_type* header()const{return this->final_header();}
-
- static void relocate(node_type* position,node_type* x)
- {
- node_impl_type::relocate(position->up(),x->up());
- }
-
- static void relocate(node_type* position,node_type* first,node_type* last)
- {
- node_impl_type::relocate(
- position->up(),first->up(),last->up());
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_SAFE_MODE)
- void detach_iterators(node_type* x)
- {
- iterator it=make_iterator(x);
- safe_mode::detach_equivalent_iterators(it);
- }
-#endif
-
- template <class InputIterator>
- void assign_iter(InputIterator first,InputIterator last,mpl::true_)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- clear();
- for(;first!=last;++first)this->final_insert_ref_(*first);
- }
-
- void assign_iter(size_type n,value_param_type value,mpl::false_)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- clear();
- for(size_type i=0;i<n;++i)push_back(value);
- }
-
- template<typename InputIterator>
- void insert_iter(
- iterator position,InputIterator first,InputIterator last,mpl::true_)
- {
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=0;
- BOOST_TRY{
- for(;first!=last;++first){
- if(this->final_insert_ref_(*first).second)++s;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-s,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-s,end());
- }
-
- void insert_iter(
- iterator position,size_type n,value_param_type x,mpl::false_)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- size_type s=0;
- BOOST_TRY{
- while(n--){
- if(push_back(x).second)++s;
- }
- }
- BOOST_CATCH(...){
- relocate(position,end()-s,end());
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- relocate(position,end()-s,end());
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_front_impl(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return emplace_impl(begin(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_back_impl(
- BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- return emplace_impl(end(),BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- }
-
- template<BOOST_MULTI_INDEX_TEMPLATE_PARAM_PACK>
- std::pair<iterator,bool> emplace_impl(
- iterator position,BOOST_MULTI_INDEX_FUNCTION_PARAM_PACK)
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
- BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT;
- std::pair<final_node_type*,bool> p=
- this->final_emplace_(BOOST_MULTI_INDEX_FORWARD_PARAM_PACK);
- if(p.second&&position.get_node()!=header()){
- relocate(position.get_node(),p.first);
- }
- return std::pair<iterator,bool>(make_iterator(p.first),p.second);
- }
-
- ptr_array ptrs;
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)&&\
- BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-#pragma parse_mfunc_templ reset
-#endif
-};
-
-/* comparison */
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator==(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return x.size()==y.size()&&std::equal(x.begin(),x.end(),y.begin());
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator!=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return !(x==y);
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return y<x;
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return !(x<y);
-}
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y)
-{
- return !(x>y);
-}
-
-/* specialized algorithms */
-
-template<typename SuperMeta,typename TagList>
-void swap(
- random_access_index<SuperMeta,TagList>& x,
- random_access_index<SuperMeta,TagList>& y)
-{
- x.swap(y);
-}
-
-} /* namespace multi_index::detail */
-
-/* random access index specifier */
-
-template <typename TagList>
-struct random_access
-{
- BOOST_STATIC_ASSERT(detail::is_tag<TagList>::value);
-
- template<typename Super>
- struct node_class
- {
- typedef detail::random_access_index_node<Super> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::random_access_index<
- SuperMeta,typename TagList::type> type;
- };
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-/* Boost.Foreach compatibility */
-
-template<typename SuperMeta,typename TagList>
-inline boost::mpl::true_* boost_foreach_is_noncopyable(
- boost::multi_index::detail::random_access_index<SuperMeta,TagList>*&,
- boost_foreach_argument_dependent_lookup_hack)
-{
- return 0;
-}
-
-#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT
-#undef BOOST_MULTI_INDEX_RND_INDEX_CHECK_INVARIANT_OF
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/random_access_index_fwd.hpp b/contrib/restricted/boost/boost/multi_index/random_access_index_fwd.hpp
deleted file mode 100644
index 2ea19295426..00000000000
--- a/contrib/restricted/boost/boost/multi_index/random_access_index_fwd.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright 2003-2013 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_RANDOM_ACCESS_INDEX_FWD_HPP
-#define BOOST_MULTI_INDEX_RANDOM_ACCESS_INDEX_FWD_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/multi_index/tag.hpp>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-template<typename SuperMeta,typename TagList>
-class random_access_index;
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator==(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y);
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y);
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator!=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y);
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y);
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator>=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y);
-
-template<
- typename SuperMeta1,typename TagList1,
- typename SuperMeta2,typename TagList2
->
-bool operator<=(
- const random_access_index<SuperMeta1,TagList1>& x,
- const random_access_index<SuperMeta2,TagList2>& y);
-
-template<typename SuperMeta,typename TagList>
-void swap(
- random_access_index<SuperMeta,TagList>& x,
- random_access_index<SuperMeta,TagList>& y);
-
-} /* namespace multi_index::detail */
-
-/* index specifiers */
-
-template <typename TagList=tag<> >
-struct random_access;
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/ranked_index.hpp b/contrib/restricted/boost/boost/multi_index/ranked_index.hpp
deleted file mode 100644
index 4b24c4f5937..00000000000
--- a/contrib/restricted/boost/boost/multi_index/ranked_index.hpp
+++ /dev/null
@@ -1,382 +0,0 @@
-/* Copyright 2003-2017 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_RANKED_INDEX_HPP
-#define BOOST_MULTI_INDEX_RANKED_INDEX_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/multi_index/detail/ord_index_impl.hpp>
-#include <boost/multi_index/detail/rnk_index_ops.hpp>
-#include <boost/multi_index/ranked_index_fwd.hpp>
-
-namespace boost{
-
-namespace multi_index{
-
-namespace detail{
-
-/* ranked_index augments a given ordered index to provide rank operations */
-
-template<typename OrderedIndexNodeImpl>
-struct ranked_node:OrderedIndexNodeImpl
-{
- std::size_t size;
-};
-
-template<typename OrderedIndexImpl>
-class ranked_index:public OrderedIndexImpl
-{
- typedef OrderedIndexImpl super;
-
-protected:
- typedef typename super::node_type node_type;
- typedef typename super::node_impl_pointer node_impl_pointer;
-
-public:
- typedef typename super::ctor_args_list ctor_args_list;
- typedef typename super::allocator_type allocator_type;
- typedef typename super::iterator iterator;
-
- /* rank operations */
-
- iterator nth(std::size_t n)const
- {
- return this->make_iterator(node_type::from_impl(
- ranked_index_nth(n,this->header()->impl())));
- }
-
- std::size_t rank(iterator position)const
- {
- BOOST_MULTI_INDEX_CHECK_VALID_ITERATOR(position);
- BOOST_MULTI_INDEX_CHECK_IS_OWNER(position,*this);
-
- return ranked_index_rank(
- position.get_node()->impl(),this->header()->impl());
- }
-
- template<typename CompatibleKey>
- std::size_t find_rank(const CompatibleKey& x)const
- {
- return ranked_index_find_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::size_t find_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_find_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename CompatibleKey>
- std::size_t lower_bound_rank(const CompatibleKey& x)const
- {
- return ranked_index_lower_bound_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::size_t lower_bound_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_lower_bound_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename CompatibleKey>
- std::size_t upper_bound_rank(const CompatibleKey& x)const
- {
- return ranked_index_upper_bound_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::size_t upper_bound_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_upper_bound_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename CompatibleKey>
- std::pair<std::size_t,std::size_t> equal_range_rank(
- const CompatibleKey& x)const
- {
- return ranked_index_equal_range_rank(
- this->root(),this->header(),this->key,x,this->comp_);
- }
-
- template<typename CompatibleKey,typename CompatibleCompare>
- std::pair<std::size_t,std::size_t> equal_range_rank(
- const CompatibleKey& x,const CompatibleCompare& comp)const
- {
- return ranked_index_equal_range_rank(
- this->root(),this->header(),this->key,x,comp);
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder lower,UpperBounder upper)const
- {
- typedef typename mpl::if_<
- is_same<LowerBounder,unbounded_type>,
- BOOST_DEDUCED_TYPENAME mpl::if_<
- is_same<UpperBounder,unbounded_type>,
- both_unbounded_tag,
- lower_unbounded_tag
- >::type,
- BOOST_DEDUCED_TYPENAME mpl::if_<
- is_same<UpperBounder,unbounded_type>,
- upper_unbounded_tag,
- none_unbounded_tag
- >::type
- >::type dispatch;
-
- return range_rank(lower,upper,dispatch());
- }
-
-protected:
- ranked_index(const ranked_index& x):super(x){};
-
- ranked_index(const ranked_index& x,do_not_copy_elements_tag):
- super(x,do_not_copy_elements_tag()){};
-
- ranked_index(
- const ctor_args_list& args_list,const allocator_type& al):
- super(args_list,al){}
-
-private:
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder lower,UpperBounder upper,none_unbounded_tag)const
- {
- node_type* y=this->header();
- node_type* z=this->root();
-
- if(!z)return std::pair<std::size_t,std::size_t>(0,0);
-
- std::size_t s=z->impl()->size;
-
- do{
- if(!lower(this->key(z->value()))){
- z=node_type::from_impl(z->right());
- }
- else if(!upper(this->key(z->value()))){
- y=z;
- s-=ranked_node_size(y->right())+1;
- z=node_type::from_impl(z->left());
- }
- else{
- return std::pair<std::size_t,std::size_t>(
- s-z->impl()->size+
- lower_range_rank(node_type::from_impl(z->left()),z,lower),
- s-ranked_node_size(z->right())+
- upper_range_rank(node_type::from_impl(z->right()),y,upper));
- }
- }while(z);
-
- return std::pair<std::size_t,std::size_t>(s,s);
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder,UpperBounder upper,lower_unbounded_tag)const
- {
- return std::pair<std::size_t,std::size_t>(
- 0,
- upper_range_rank(this->root(),this->header(),upper));
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder lower,UpperBounder,upper_unbounded_tag)const
- {
- return std::pair<std::size_t,std::size_t>(
- lower_range_rank(this->root(),this->header(),lower),
- this->size());
- }
-
- template<typename LowerBounder,typename UpperBounder>
- std::pair<std::size_t,std::size_t>
- range_rank(LowerBounder,UpperBounder,both_unbounded_tag)const
- {
- return std::pair<std::size_t,std::size_t>(0,this->size());
- }
-
- template<typename LowerBounder>
- std::size_t
- lower_range_rank(node_type* top,node_type* y,LowerBounder lower)const
- {
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(lower(this->key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=node_type::from_impl(top->left());
- }
- else top=node_type::from_impl(top->right());
- }while(top);
-
- return s;
- }
-
- template<typename UpperBounder>
- std::size_t
- upper_range_rank(node_type* top,node_type* y,UpperBounder upper)const
- {
- if(!top)return 0;
-
- std::size_t s=top->impl()->size;
-
- do{
- if(!upper(this->key(top->value()))){
- y=top;
- s-=ranked_node_size(y->right())+1;
- top=node_type::from_impl(top->left());
- }
- else top=node_type::from_impl(top->right());
- }while(top);
-
- return s;
- }
-};
-
-/* augmenting policy for ordered_index */
-
-struct rank_policy
-{
- template<typename OrderedIndexNodeImpl>
- struct augmented_node
- {
- typedef ranked_node<OrderedIndexNodeImpl> type;
- };
-
- template<typename OrderedIndexImpl>
- struct augmented_interface
- {
- typedef ranked_index<OrderedIndexImpl> type;
- };
-
- /* algorithmic stuff */
-
- template<typename Pointer>
- static void add(Pointer x,Pointer root)
- {
- x->size=1;
- while(x!=root){
- x=x->parent();
- ++(x->size);
- }
- }
-
- template<typename Pointer>
- static void remove(Pointer x,Pointer root)
- {
- while(x!=root){
- x=x->parent();
- --(x->size);
- }
- }
-
- template<typename Pointer>
- static void copy(Pointer x,Pointer y)
- {
- y->size=x->size;
- }
-
- template<typename Pointer>
- static void rotate_left(Pointer x,Pointer y) /* in: x==y->left() */
- {
- y->size=x->size;
- x->size=ranked_node_size(x->left())+ranked_node_size(x->right())+1;
- }
-
- template<typename Pointer>
- static void rotate_right(Pointer x,Pointer y) /* in: x==y->right() */
- {
- rotate_left(x,y);
- }
-
-#if defined(BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING)
- /* invariant stuff */
-
- template<typename Pointer>
- static bool invariant(Pointer x)
- {
- return x->size==ranked_node_size(x->left())+ranked_node_size(x->right())+1;
- }
-#endif
-};
-
-} /* namespace multi_index::detail */
-
-/* ranked_index specifiers */
-
-template<typename Arg1,typename Arg2,typename Arg3>
-struct ranked_unique
-{
- typedef typename detail::ordered_index_args<
- Arg1,Arg2,Arg3> index_args;
- typedef typename index_args::tag_list_type::type tag_list_type;
- typedef typename index_args::key_from_value_type key_from_value_type;
- typedef typename index_args::compare_type compare_type;
-
- template<typename Super>
- struct node_class
- {
- typedef detail::ordered_index_node<detail::rank_policy,Super> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::ordered_index<
- key_from_value_type,compare_type,
- SuperMeta,tag_list_type,detail::ordered_unique_tag,
- detail::rank_policy> type;
- };
-};
-
-template<typename Arg1,typename Arg2,typename Arg3>
-struct ranked_non_unique
-{
- typedef detail::ordered_index_args<
- Arg1,Arg2,Arg3> index_args;
- typedef typename index_args::tag_list_type::type tag_list_type;
- typedef typename index_args::key_from_value_type key_from_value_type;
- typedef typename index_args::compare_type compare_type;
-
- template<typename Super>
- struct node_class
- {
- typedef detail::ordered_index_node<detail::rank_policy,Super> type;
- };
-
- template<typename SuperMeta>
- struct index_class
- {
- typedef detail::ordered_index<
- key_from_value_type,compare_type,
- SuperMeta,tag_list_type,detail::ordered_non_unique_tag,
- detail::rank_policy> type;
- };
-};
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/boost/multi_index/ranked_index_fwd.hpp b/contrib/restricted/boost/boost/multi_index/ranked_index_fwd.hpp
deleted file mode 100644
index 380d3480736..00000000000
--- a/contrib/restricted/boost/boost/multi_index/ranked_index_fwd.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Copyright 2003-2015 Joaquin M Lopez Munoz.
- * 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/multi_index for library home page.
- */
-
-#ifndef BOOST_MULTI_INDEX_RANKED_INDEX_FWD_HPP
-#define BOOST_MULTI_INDEX_RANKED_INDEX_FWD_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/multi_index/detail/ord_index_args.hpp>
-#include <boost/multi_index/detail/ord_index_impl_fwd.hpp>
-
-namespace boost{
-
-namespace multi_index{
-
-/* ranked_index specifiers */
-
-template<typename Arg1,typename Arg2=mpl::na,typename Arg3=mpl::na>
-struct ranked_unique;
-
-template<typename Arg1,typename Arg2=mpl::na,typename Arg3=mpl::na>
-struct ranked_non_unique;
-
-} /* namespace multi_index */
-
-} /* namespace boost */
-
-#endif
diff --git a/contrib/restricted/boost/libs/CMakeLists.txt b/contrib/restricted/boost/libs/CMakeLists.txt
index fb46cf09731..9b6a0f564ea 100644
--- a/contrib/restricted/boost/libs/CMakeLists.txt
+++ b/contrib/restricted/boost/libs/CMakeLists.txt
@@ -7,4 +7,3 @@
add_subdirectory(graph)
-add_subdirectory(multi_index)
diff --git a/contrib/restricted/boost/libs/multi_index/CMakeLists.txt b/contrib/restricted/boost/libs/multi_index/CMakeLists.txt
deleted file mode 100644
index 2203ce42819..00000000000
--- a/contrib/restricted/boost/libs/multi_index/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-
-# 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(boost-libs-multi_index INTERFACE)
-target_link_libraries(boost-libs-multi_index INTERFACE
- contrib-libs-cxxsupp
- contrib-restricted-boost
- restricted-boost-serialization
-)
diff --git a/contrib/restricted/boost/multi_index/CMakeLists.txt b/contrib/restricted/boost/multi_index/CMakeLists.txt
new file mode 100644
index 00000000000..27b89de3a46
--- /dev/null
+++ b/contrib/restricted/boost/multi_index/CMakeLists.txt
@@ -0,0 +1,36 @@
+
+# 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-multi_index INTERFACE)
+target_include_directories(restricted-boost-multi_index INTERFACE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/multi_index/include
+)
+target_link_libraries(restricted-boost-multi_index INTERFACE
+ contrib-libs-cxxsupp
+ yutil
+ restricted-boost-assert
+ restricted-boost-bind
+ restricted-boost-config
+ restricted-boost-container_hash
+ restricted-boost-core
+ restricted-boost-detail
+ restricted-boost-foreach
+ restricted-boost-integer
+ restricted-boost-iterator
+ restricted-boost-move
+ restricted-boost-mpl
+ restricted-boost-preprocessor
+ restricted-boost-serialization
+ restricted-boost-smart_ptr
+ restricted-boost-static_assert
+ restricted-boost-throw_exception
+ restricted-boost-tuple
+ restricted-boost-type_traits
+ restricted-boost-utility
+)
diff --git a/contrib/restricted/boost/boost/multi_index/detail/access_specifier.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/access_specifier.hpp
index f3346e836d4..f3346e836d4 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/access_specifier.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/access_specifier.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/adl_swap.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/adl_swap.hpp
index 02b06442290..02b06442290 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/adl_swap.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/adl_swap.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/archive_constructed.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/archive_constructed.hpp
index 0a7a26e0d4e..0a7a26e0d4e 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/archive_constructed.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/archive_constructed.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/auto_space.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/auto_space.hpp
index 911f810f8fa..911f810f8fa 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/auto_space.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/auto_space.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/base_type.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/base_type.hpp
index 8c9b62b716a..8c9b62b716a 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/base_type.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/base_type.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/bidir_node_iterator.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/bidir_node_iterator.hpp
index 9be5ec84b43..9be5ec84b43 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/bidir_node_iterator.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/bidir_node_iterator.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/bucket_array.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/bucket_array.hpp
index d9fa434d9a9..d9fa434d9a9 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/bucket_array.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/bucket_array.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/converter.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/converter.hpp
index 3e04a3e8295..3e04a3e8295 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/converter.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/converter.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/copy_map.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/copy_map.hpp
index 1ab2bf00433..1ab2bf00433 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/copy_map.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/copy_map.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/do_not_copy_elements_tag.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/do_not_copy_elements_tag.hpp
index f0fa7304253..f0fa7304253 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/do_not_copy_elements_tag.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/do_not_copy_elements_tag.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/duplicates_iterator.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/duplicates_iterator.hpp
index cbebf264045..cbebf264045 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/duplicates_iterator.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/duplicates_iterator.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/has_tag.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/has_tag.hpp
index 217b61143af..217b61143af 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/has_tag.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/has_tag.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/hash_index_args.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_args.hpp
index 81902f5a4a5..81902f5a4a5 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/hash_index_args.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_args.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/hash_index_iterator.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_iterator.hpp
index 8d063002a1d..8d063002a1d 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/hash_index_iterator.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_iterator.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/hash_index_node.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_node.hpp
index 2be575b4693..2be575b4693 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/hash_index_node.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/hash_index_node.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/header_holder.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/header_holder.hpp
index ca8a9b2edb1..ca8a9b2edb1 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/header_holder.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/header_holder.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/ignore_wstrict_aliasing.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
index ae398456d1f..ae398456d1f 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/index_base.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_base.hpp
index 22cf0f14027..22cf0f14027 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/index_base.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_base.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/index_loader.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_loader.hpp
index 71418a10e19..71418a10e19 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/index_loader.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_loader.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/index_matcher.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_matcher.hpp
index 34d1f9d5a8d..34d1f9d5a8d 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/index_matcher.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_matcher.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/index_node_base.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_node_base.hpp
index 1a1f0cae4be..1a1f0cae4be 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/index_node_base.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_node_base.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/index_saver.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_saver.hpp
index ae09d4eba4f..ae09d4eba4f 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/index_saver.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/index_saver.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/invariant_assert.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/invariant_assert.hpp
index c6c547c7c33..c6c547c7c33 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/invariant_assert.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/invariant_assert.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/is_index_list.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/is_index_list.hpp
index f6a24218b81..f6a24218b81 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/is_index_list.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/is_index_list.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/is_transparent.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/is_transparent.hpp
index 72036d257e2..72036d257e2 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/is_transparent.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/is_transparent.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/iter_adaptor.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/iter_adaptor.hpp
index 7a032350b36..7a032350b36 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/iter_adaptor.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/iter_adaptor.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/modify_key_adaptor.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/modify_key_adaptor.hpp
index 6df89b18386..6df89b18386 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/modify_key_adaptor.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/modify_key_adaptor.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/no_duplicate_tags.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/no_duplicate_tags.hpp
index ba216ed82cf..ba216ed82cf 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/no_duplicate_tags.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/no_duplicate_tags.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/node_type.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/node_type.hpp
index 7fe85cf968b..7fe85cf968b 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/node_type.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/node_type.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/ord_index_args.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_args.hpp
index 3e2641f2f4d..3e2641f2f4d 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/ord_index_args.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_args.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/ord_index_impl.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_impl.hpp
index 1093b87c99e..1093b87c99e 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/ord_index_impl.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_impl.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/ord_index_impl_fwd.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_impl_fwd.hpp
index 6590ef05fdd..6590ef05fdd 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/ord_index_impl_fwd.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_impl_fwd.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/ord_index_node.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_node.hpp
index 8dd8a5ce4b6..b4ed3ea3adc 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/ord_index_node.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_node.hpp
@@ -142,6 +142,7 @@ struct ordered_index_node_compressed_base
struct color_ref
{
color_ref(uintptr_type* r_):r(r_){}
+
color_ref(color_ref const& x):r(x.r){}
operator ordered_index_color()const
@@ -168,7 +169,8 @@ struct ordered_index_node_compressed_base
struct parent_ref
{
parent_ref(uintptr_type* r_):r(r_){}
- parent_ref(const parent_ref& x):r(x.r){}
+
+ parent_ref(parent_ref const& x):r(x.r){}
operator pointer()const
{
diff --git a/contrib/restricted/boost/boost/multi_index/detail/ord_index_ops.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_ops.hpp
index 84d5cacae19..84d5cacae19 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/ord_index_ops.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/ord_index_ops.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/promotes_arg.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/promotes_arg.hpp
index 7a11b6e9fbe..7a11b6e9fbe 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/promotes_arg.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/promotes_arg.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/raw_ptr.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/raw_ptr.hpp
index c32007435c0..c32007435c0 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/raw_ptr.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/raw_ptr.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/restore_wstrict_aliasing.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/restore_wstrict_aliasing.hpp
index ee2c799d5a8..ee2c799d5a8 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/restore_wstrict_aliasing.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/restore_wstrict_aliasing.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/safe_mode.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/safe_mode.hpp
index 905270e9fb3..905270e9fb3 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/safe_mode.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/safe_mode.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/scope_guard.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/scope_guard.hpp
index 116f8f50415..116f8f50415 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/scope_guard.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/scope_guard.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/seq_index_node.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/seq_index_node.hpp
index abbe4e5795f..abbe4e5795f 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/seq_index_node.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/seq_index_node.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/seq_index_ops.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/seq_index_ops.hpp
index 142bdd9dd9a..142bdd9dd9a 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/seq_index_ops.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/seq_index_ops.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/serialization_version.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/serialization_version.hpp
index ccd8bb4f791..ccd8bb4f791 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/serialization_version.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/serialization_version.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/uintptr_type.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/uintptr_type.hpp
index 9c92d01d4de..9c92d01d4de 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/uintptr_type.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/uintptr_type.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/unbounded.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/unbounded.hpp
index dc09be1770d..dc09be1770d 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/unbounded.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/unbounded.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/value_compare.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/value_compare.hpp
index ac42e8779aa..ac42e8779aa 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/value_compare.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/value_compare.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/detail/vartempl_support.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/vartempl_support.hpp
index 06ff430f4be..06ff430f4be 100644
--- a/contrib/restricted/boost/boost/multi_index/detail/vartempl_support.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/detail/vartempl_support.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/hashed_index.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/hashed_index.hpp
index 7b142223742..7b142223742 100644
--- a/contrib/restricted/boost/boost/multi_index/hashed_index.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/hashed_index.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/hashed_index_fwd.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/hashed_index_fwd.hpp
index d77e36c321b..d77e36c321b 100644
--- a/contrib/restricted/boost/boost/multi_index/hashed_index_fwd.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/hashed_index_fwd.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/identity.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/identity.hpp
index 6c832ce1562..6c832ce1562 100644
--- a/contrib/restricted/boost/boost/multi_index/identity.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/identity.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/identity_fwd.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/identity_fwd.hpp
index af6bd55ef5f..af6bd55ef5f 100644
--- a/contrib/restricted/boost/boost/multi_index/identity_fwd.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/identity_fwd.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/indexed_by.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/indexed_by.hpp
index d2217e39166..d2217e39166 100644
--- a/contrib/restricted/boost/boost/multi_index/indexed_by.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/indexed_by.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/mem_fun.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/mem_fun.hpp
index 111c386c5f5..111c386c5f5 100644
--- a/contrib/restricted/boost/boost/multi_index/mem_fun.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/mem_fun.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/member.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/member.hpp
index a8e645074a2..a8e645074a2 100644
--- a/contrib/restricted/boost/boost/multi_index/member.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/member.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/ordered_index.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/ordered_index.hpp
index 5bcd69de8c9..5bcd69de8c9 100644
--- a/contrib/restricted/boost/boost/multi_index/ordered_index.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/ordered_index.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/ordered_index_fwd.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/ordered_index_fwd.hpp
index fe44aaf860d..fe44aaf860d 100644
--- a/contrib/restricted/boost/boost/multi_index/ordered_index_fwd.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/ordered_index_fwd.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/safe_mode_errors.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/safe_mode_errors.hpp
index 1904706edec..1904706edec 100644
--- a/contrib/restricted/boost/boost/multi_index/safe_mode_errors.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/safe_mode_errors.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/sequenced_index.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/sequenced_index.hpp
index ad538e0c4b5..ad538e0c4b5 100644
--- a/contrib/restricted/boost/boost/multi_index/sequenced_index.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/sequenced_index.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/sequenced_index_fwd.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/sequenced_index_fwd.hpp
index a019f2a6d2f..a019f2a6d2f 100644
--- a/contrib/restricted/boost/boost/multi_index/sequenced_index_fwd.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/sequenced_index_fwd.hpp
diff --git a/contrib/restricted/boost/boost/multi_index/tag.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index/tag.hpp
index ce51f8241ee..ce51f8241ee 100644
--- a/contrib/restricted/boost/boost/multi_index/tag.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index/tag.hpp
diff --git a/contrib/restricted/boost/boost/multi_index_container.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index_container.hpp
index f0190d5ff77..f0190d5ff77 100644
--- a/contrib/restricted/boost/boost/multi_index_container.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index_container.hpp
diff --git a/contrib/restricted/boost/boost/multi_index_container_fwd.hpp b/contrib/restricted/boost/multi_index/include/boost/multi_index_container_fwd.hpp
index b35acad407a..b35acad407a 100644
--- a/contrib/restricted/boost/boost/multi_index_container_fwd.hpp
+++ b/contrib/restricted/boost/multi_index/include/boost/multi_index_container_fwd.hpp
diff --git a/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.darwin.txt b/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.darwin.txt
index 879d1d28f16..1f4be5d5c59 100644
--- a/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.darwin.txt
+++ b/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.darwin.txt
@@ -21,7 +21,7 @@ target_link_libraries(clickhouse_client_udf INTERFACE
public-udf-support
contrib-libs-cctz
contrib-restricted-boost
- boost-libs-multi_index
+ restricted-boost-multi_index
restricted-boost-program_options
contrib-restricted-cityhash-1.0.2
contrib-restricted-fast_float
@@ -81,7 +81,7 @@ target_link_libraries(clickhouse_client_udf.global PUBLIC
public-udf-support
contrib-libs-cctz
contrib-restricted-boost
- boost-libs-multi_index
+ restricted-boost-multi_index
restricted-boost-program_options
contrib-restricted-cityhash-1.0.2
contrib-restricted-fast_float
diff --git a/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.linux.txt b/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.linux.txt
index 42a31cb5eb6..e9cd1e0586a 100644
--- a/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.linux.txt
+++ b/ydb/library/yql/udfs/common/clickhouse/client/CMakeLists.linux.txt
@@ -21,7 +21,7 @@ target_link_libraries(clickhouse_client_udf INTERFACE
public-udf-support
contrib-libs-cctz
contrib-restricted-boost
- boost-libs-multi_index
+ restricted-boost-multi_index
restricted-boost-program_options
contrib-restricted-cityhash-1.0.2
contrib-restricted-fast_float
@@ -81,7 +81,7 @@ target_link_libraries(clickhouse_client_udf.global PUBLIC
public-udf-support
contrib-libs-cctz
contrib-restricted-boost
- boost-libs-multi_index
+ restricted-boost-multi_index
restricted-boost-program_options
contrib-restricted-cityhash-1.0.2
contrib-restricted-fast_float