passenger 5.1.4 → 5.1.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.editorconfig +9 -0
- data/CHANGELOG +9 -0
- data/build/cxx_tests.rb +11 -1
- data/build/documentation.rb +0 -32
- data/build/support/cxx_dependency_map.rb +602 -2
- data/build/test_basics.rb +3 -3
- data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +48 -0
- data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +33 -0
- data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +25 -0
- data/dev/ci/README.md +121 -0
- data/dev/ci/lib/functions.sh +129 -0
- data/dev/ci/lib/set-container-envvars.sh +46 -0
- data/dev/ci/lib/setup-container.sh +43 -0
- data/dev/ci/run-tests-natively +24 -0
- data/dev/ci/run-tests-with-docker +42 -0
- data/dev/ci/scripts/debug-console-wrapper.sh +27 -0
- data/dev/ci/scripts/docker-entrypoint-stage2.sh +17 -0
- data/dev/ci/scripts/docker-entrypoint.sh +17 -0
- data/dev/ci/scripts/inituidgid +17 -0
- data/dev/ci/scripts/run-tests-natively-stage2.sh +17 -0
- data/dev/ci/scripts/setup-host-natively.sh +11 -0
- data/dev/ci/setup-host +50 -0
- data/dev/ci/tests/apache2/run +6 -0
- data/dev/ci/tests/apache2/setup +4 -0
- data/dev/ci/tests/cxx/run +9 -0
- data/dev/ci/tests/cxx/setup +4 -0
- data/dev/ci/tests/nginx-dynamic/run +20 -0
- data/dev/ci/tests/nginx-dynamic/setup +4 -0
- data/dev/ci/tests/nginx/run +5 -0
- data/dev/ci/tests/nginx/setup +4 -0
- data/dev/ci/tests/nodejs/run +4 -0
- data/dev/ci/tests/nodejs/setup +4 -0
- data/dev/ci/tests/ruby/run +4 -0
- data/dev/ci/tests/ruby/setup +4 -0
- data/dev/ci/tests/source-packaging/run +4 -0
- data/dev/ci/tests/source-packaging/setup +4 -0
- data/dev/ci/tests/standalone/run +4 -0
- data/dev/ci/tests/standalone/setup +4 -0
- data/dev/copy_boost_headers +8 -2
- data/src/agent/Core/ApiServer.h +11 -5
- data/src/agent/Core/Controller.h +12 -46
- data/src/agent/Core/Controller/CheckoutSession.cpp +1 -1
- data/src/agent/Core/Controller/Config.h +369 -0
- data/src/agent/Core/Controller/ForwardResponse.cpp +4 -4
- data/src/agent/Core/Controller/Hooks.cpp +15 -3
- data/src/agent/Core/Controller/Implementation.cpp +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +28 -39
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +25 -60
- data/src/agent/Core/Controller/InternalUtils.cpp +0 -16
- data/src/agent/Core/Controller/Miscellaneous.cpp +0 -17
- data/src/agent/Core/Controller/Request.h +2 -0
- data/src/agent/Core/Controller/SendRequest.cpp +4 -4
- data/src/agent/Core/Controller/{StateInspectionAndConfiguration.cpp → StateInspection.cpp} +0 -22
- data/src/agent/Core/Controller/TurboCaching.h +11 -10
- data/src/agent/Core/CoreMain.cpp +16 -6
- data/src/agent/Core/ResponseCache.h +3 -3
- data/src/agent/Core/SpawningKit/SmartSpawner.h +9 -3
- data/src/agent/Core/SpawningKit/Spawner.h +7 -3
- data/src/agent/UstRouter/ApiServer.h +3 -2
- data/src/agent/UstRouter/Controller.h +66 -32
- data/src/agent/UstRouter/UstRouterMain.cpp +10 -2
- data/src/agent/Watchdog/ApiServer.h +3 -2
- data/src/agent/Watchdog/WatchdogMain.cpp +3 -1
- data/src/apache2_module/ConfigurationCommands.cpp +1 -1
- data/src/cxx_supportlib/ConfigKit/Common.h +125 -0
- data/src/cxx_supportlib/ConfigKit/ConfigKit.h +34 -0
- data/src/cxx_supportlib/ConfigKit/README.md +895 -0
- data/src/cxx_supportlib/ConfigKit/Schema.h +331 -0
- data/src/cxx_supportlib/ConfigKit/Store.h +385 -0
- data/src/cxx_supportlib/ConfigKit/TableTranslator.h +185 -0
- data/src/cxx_supportlib/ConfigKit/Utils.h +141 -0
- data/src/cxx_supportlib/ConfigKit/VariantMapUtils.h +81 -0
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/Crypto.cpp +2 -2
- data/src/cxx_supportlib/Logging.h +0 -35
- data/src/cxx_supportlib/ServerKit/HttpServer.h +35 -16
- data/src/cxx_supportlib/ServerKit/Server.h +65 -25
- data/src/cxx_supportlib/oxt/macros.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/replace.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/array.hpp +53 -42
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_template.hpp +11 -5
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +13 -2
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_x86.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +8 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_alpha.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sparc.hpp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sync.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +28 -17
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_linux_arm.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_arm.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_x86.hpp +9 -4
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/bind/arg.hpp +10 -3
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +90 -18
- data/src/cxx_supportlib/vendor-modified/boost/cerrno.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +8 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +35 -6
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/comeau.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/compaq_cxx.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +19 -4
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/greenhills.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +29 -7
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/kai.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pgi.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sgi_mipspro.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +44 -16
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/cygwin.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/linux.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/select_compiler_config.hpp +21 -21
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +42 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +40 -7
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +39 -6
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +8 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/suffix.hpp +33 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +0 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +34 -27
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +62 -26
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/addressof.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +39 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +49 -32
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +175 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +223 -98
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_sorted.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +88 -41
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +7 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +4 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +45 -18
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +205 -26
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +290 -181
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +24 -19
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +320 -46
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +91 -18
- data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +23 -19
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +491 -120
- data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +0 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +399 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/deque.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_map.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/list.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/map.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/set.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/slist.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/small_vector.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/stable_vector.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/string.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/vector.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +101 -20
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +19 -14
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +117 -59
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +33 -28
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +414 -70
- data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +134 -117
- data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +202 -99
- data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +8 -10
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +217 -1
- data/src/cxx_supportlib/vendor-modified/boost/core/scoped_enum.hpp +29 -27
- data/src/cxx_supportlib/vendor-modified/boost/current_function.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/c_time.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/date_time/constrained_value.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration_types.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_facet.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_names_put.hpp +8 -7
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_calendar.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day_of_year.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration_types.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_facet.hpp +27 -7
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_serialize.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/posix_time_zone.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/date_duration_operators.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_config.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/ptime.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_parsers.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_base.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/year_month_day.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/detail/iterator.hpp +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/lcast_precision.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/workaround.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/shared_ptr.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +25 -3
- data/src/cxx_supportlib/vendor-modified/boost/exception/get_error_info.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +114 -1
- data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +116 -142
- data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +57 -69
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/hash_float.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/extensions.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash.hpp +27 -13
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/any_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +99 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +35 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +37 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +95 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +209 -72
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +86 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +11 -11
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algo_type.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +58 -45
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/avltree_node.hpp +27 -26
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_begin.hpp +8 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +27 -26
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/equal_to_value.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/exception_disposer.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +9 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/has_member_function_callable_with.hpp +83 -57
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +30 -30
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +9 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iiterator.hpp +8 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +16 -15
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +70 -44
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +22 -21
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_node.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/rbtree_node.hpp +29 -28
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/reverse_iterator.hpp +33 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp +19 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +21 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_node.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/to_raw_pointer.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/transform_iterator.hpp +23 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +23 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_node.hpp +10 -9
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +103 -29
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +295 -211
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +20 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/member_value_traits.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/options.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/parent_from_member.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +22 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +36 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +43 -13
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +95 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/set_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +96 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +102 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +48 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +20 -11
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist_hook.hpp +9 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +95 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +36 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +167 -23
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +100 -46
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/trivial_value_traits.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +37 -27
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +30 -14
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +35 -36
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +6 -28
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +20 -5
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once.cpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +11 -7
- data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +40 -7
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +2437 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/insertion_sort.hpp +127 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +637 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge_sort.hpp +139 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +155 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +1 -116
- data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +14 -13
- data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +17 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/destruct_n.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +227 -32
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_traits.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +30 -9
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +84 -80
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/placement_new.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/reverse_iterator.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +14 -20
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +32 -33
- data/src/cxx_supportlib/vendor-modified/boost/move/make_unique.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +49 -49
- data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +8 -7
- data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +17 -16
- data/src/cxx_supportlib/vendor-modified/boost/mpl/print.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/none.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +197 -255
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +1059 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_aligned_storage.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +116 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_factory_support.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +253 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +196 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +117 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +372 -554
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +12 -1
- data/src/cxx_supportlib/vendor-modified/boost/pool/detail/mutex.hpp +15 -7
- data/src/cxx_supportlib/vendor-modified/boost/pool/pool_alloc.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +9 -2
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/visualc.h +15 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd.h +16 -4
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86.h +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd.h +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd/versions.h +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/predef/version_number.h +20 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/cat.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +5 -6
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/to_list_msvc.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/to_list.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/const_iterator.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +0 -5
- data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +16 -16
- data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +102 -87
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +45 -21
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +14 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +5 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +5 -14
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +116 -13
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +1004 -159
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/bad_weak_ptr.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +4 -58
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +5 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_noexcept.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +28 -3
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ref_counter.hpp +187 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +52 -144
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +120 -450
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +70 -8
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +9 -8
- data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/barrier.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/completion_latch.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_views.hpp +0 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +11 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +11 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/generic_executor_ref.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/loop_executor.hpp +22 -18
- data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +163 -55
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/launch.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_all.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/lock_types.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/thread/locks.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +6 -7
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +17 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/timespec.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/scoped_thread.hpp +23 -18
- data/src/cxx_supportlib/vendor-modified/boost/thread/synchronized_value.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp +19 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/thread_guard.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/user_scheduler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +265 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +272 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +300 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_reference.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/aligned_storage.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/common_type.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_arithmetic_type.hpp +9 -3
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/mp_defer.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/extent.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_assign.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_constructor.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_destructor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_assign.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_copy.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_destructor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_assign.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_constructor.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_abstract.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_array.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_assignable.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_const.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +21 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pod.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_rvalue_reference.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_volatile.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_void.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/rank.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_pointer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +40 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +4986 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/map.hpp +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/set.hpp +105 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +1814 -1255
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +41 -45
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +1498 -1161
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +40 -44
- data/src/cxx_supportlib/vendor-modified/boost/utility.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/utility/base_from_member.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/utility/compare_pointees.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +39 -22
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_view.hpp +690 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_view_fwd.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/helper-scripts/crash-watch.rb +3 -0
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -12
- metadata +77 -38
- data/dev/ci/inituidgid +0 -24
- data/dev/ci/run_jenkins.sh +0 -70
- data/dev/ci/run_travis.sh +0 -314
- data/doc/Design and Architecture.html +0 -2421
- data/doc/Design and Architecture.txt +0 -511
- data/doc/Security of user switching support.html +0 -1833
- data/doc/Users guide Apache.html +0 -3101
- data/doc/Users guide Apache.idmap.txt +0 -451
- data/doc/Users guide Apache.txt +0 -534
- data/doc/Users guide Nginx.html +0 -3026
- data/doc/Users guide Nginx.idmap.txt +0 -431
- data/doc/Users guide Nginx.txt +0 -451
- data/doc/Users guide Standalone.html +0 -2092
- data/doc/Users guide Standalone.idmap.txt +0 -137
- data/doc/Users guide Standalone.txt +0 -81
- data/doc/Users guide.html +0 -1606
- data/doc/Users guide.txt +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +0 -20
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/address.hpp +0 -29
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/align.hpp +0 -40
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +0 -22
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +0 -29
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +0 -383
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_allocator.hpp +0 -318
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_count_impl.hpp +0 -67
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_traits.hpp +0 -60
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_utility.hpp +0 -214
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_if_array.hpp +0 -34
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/allocate.hpp +0 -1128
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/buckets.hpp +0 -928
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/equivalent.hpp +0 -686
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/extract_key.hpp +0 -188
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/table.hpp +0 -873
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unique.hpp +0 -628
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/util.hpp +0 -266
@@ -11,55 +11,51 @@
|
|
11
11
|
#pragma once
|
12
12
|
#endif
|
13
13
|
|
14
|
-
#include <memory>
|
15
|
-
#include <functional>
|
16
14
|
#include <boost/functional/hash_fwd.hpp>
|
17
15
|
#include <boost/unordered/detail/fwd.hpp>
|
16
|
+
#include <functional>
|
17
|
+
#include <memory>
|
18
18
|
|
19
|
-
namespace boost
|
20
|
-
{
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
template <class K, class T, class H, class P, class A>
|
54
|
-
inline void swap(unordered_multimap<K, T, H, P, A>&,
|
55
|
-
unordered_multimap<K, T, H, P, A>&);
|
56
|
-
}
|
19
|
+
namespace boost {
|
20
|
+
namespace unordered {
|
21
|
+
template <class K, class T, class H = boost::hash<K>,
|
22
|
+
class P = std::equal_to<K>,
|
23
|
+
class A = std::allocator<std::pair<const K, T> > >
|
24
|
+
class unordered_map;
|
25
|
+
|
26
|
+
template <class K, class T, class H, class P, class A>
|
27
|
+
inline bool operator==(
|
28
|
+
unordered_map<K, T, H, P, A> const&, unordered_map<K, T, H, P, A> const&);
|
29
|
+
template <class K, class T, class H, class P, class A>
|
30
|
+
inline bool operator!=(
|
31
|
+
unordered_map<K, T, H, P, A> const&, unordered_map<K, T, H, P, A> const&);
|
32
|
+
template <class K, class T, class H, class P, class A>
|
33
|
+
inline void swap(unordered_map<K, T, H, P, A>&, unordered_map<K, T, H, P, A>&);
|
34
|
+
|
35
|
+
template <class K, class T, class H = boost::hash<K>,
|
36
|
+
class P = std::equal_to<K>,
|
37
|
+
class A = std::allocator<std::pair<const K, T> > >
|
38
|
+
class unordered_multimap;
|
39
|
+
|
40
|
+
template <class K, class T, class H, class P, class A>
|
41
|
+
inline bool operator==(unordered_multimap<K, T, H, P, A> const&,
|
42
|
+
unordered_multimap<K, T, H, P, A> const&);
|
43
|
+
template <class K, class T, class H, class P, class A>
|
44
|
+
inline bool operator!=(unordered_multimap<K, T, H, P, A> const&,
|
45
|
+
unordered_multimap<K, T, H, P, A> const&);
|
46
|
+
template <class K, class T, class H, class P, class A>
|
47
|
+
inline void swap(
|
48
|
+
unordered_multimap<K, T, H, P, A>&, unordered_multimap<K, T, H, P, A>&);
|
49
|
+
|
50
|
+
template <class N, class K, class T, class A> class node_handle_map;
|
51
|
+
template <class N, class K, class T, class A> struct insert_return_type_map;
|
52
|
+
}
|
57
53
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
54
|
+
using boost::unordered::unordered_map;
|
55
|
+
using boost::unordered::unordered_multimap;
|
56
|
+
using boost::unordered::swap;
|
57
|
+
using boost::unordered::operator==;
|
58
|
+
using boost::unordered::operator!=;
|
63
59
|
}
|
64
60
|
|
65
61
|
#endif
|
@@ -14,12 +14,10 @@
|
|
14
14
|
#pragma once
|
15
15
|
#endif
|
16
16
|
|
17
|
-
#include <boost/
|
18
|
-
#include <boost/unordered/detail/equivalent.hpp>
|
19
|
-
#include <boost/unordered/detail/unique.hpp>
|
20
|
-
#include <boost/unordered/detail/util.hpp>
|
17
|
+
#include <boost/core/explicit_operator_bool.hpp>
|
21
18
|
#include <boost/functional/hash.hpp>
|
22
19
|
#include <boost/move/move.hpp>
|
20
|
+
#include <boost/unordered/detail/set.hpp>
|
23
21
|
|
24
22
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
25
23
|
#include <initializer_list>
|
@@ -28,1522 +26,1861 @@
|
|
28
26
|
#if defined(BOOST_MSVC)
|
29
27
|
#pragma warning(push)
|
30
28
|
#if BOOST_MSVC >= 1400
|
31
|
-
#pragma warning(disable:4396) //the inline specifier cannot be used when a
|
32
|
-
|
33
|
-
|
29
|
+
#pragma warning(disable : 4396) // the inline specifier cannot be used when a
|
30
|
+
// friend declaration refers to a specialization
|
31
|
+
// of a function template
|
34
32
|
#endif
|
35
33
|
#endif
|
36
34
|
|
37
|
-
namespace boost
|
35
|
+
namespace boost {
|
36
|
+
namespace unordered {
|
37
|
+
template <class T, class H, class P, class A> class unordered_set
|
38
38
|
{
|
39
|
-
namespace unordered
|
40
|
-
{
|
41
|
-
template <class T, class H, class P, class A>
|
42
|
-
class unordered_set
|
43
|
-
{
|
44
39
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
45
|
-
|
40
|
+
BOOST_COPYABLE_AND_MOVABLE(unordered_set)
|
46
41
|
#endif
|
47
|
-
|
42
|
+
template <typename, typename, typename, typename>
|
43
|
+
friend class unordered_multiset;
|
48
44
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
public:
|
46
|
+
typedef T key_type;
|
47
|
+
typedef T value_type;
|
48
|
+
typedef H hasher;
|
49
|
+
typedef P key_equal;
|
50
|
+
typedef A allocator_type;
|
54
51
|
|
55
|
-
|
52
|
+
private:
|
53
|
+
typedef boost::unordered::detail::set<A, T, H, P> types;
|
54
|
+
typedef typename types::value_allocator_traits value_allocator_traits;
|
55
|
+
typedef typename types::table table;
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
public:
|
58
|
+
typedef typename value_allocator_traits::pointer pointer;
|
59
|
+
typedef typename value_allocator_traits::const_pointer const_pointer;
|
60
60
|
|
61
|
-
|
61
|
+
typedef value_type& reference;
|
62
|
+
typedef value_type const& const_reference;
|
62
63
|
|
63
|
-
|
64
|
-
|
64
|
+
typedef std::size_t size_type;
|
65
|
+
typedef std::ptrdiff_t difference_type;
|
65
66
|
|
66
|
-
|
67
|
-
|
67
|
+
typedef typename table::cl_iterator const_local_iterator;
|
68
|
+
typedef typename table::l_iterator local_iterator;
|
69
|
+
typedef typename table::c_iterator const_iterator;
|
70
|
+
typedef typename table::iterator iterator;
|
71
|
+
typedef typename types::node_type node_type;
|
72
|
+
typedef typename types::insert_return_type insert_return_type;
|
68
73
|
|
69
|
-
|
70
|
-
|
74
|
+
private:
|
75
|
+
table table_;
|
71
76
|
|
72
|
-
|
73
|
-
|
74
|
-
typedef typename table::c_iterator const_iterator;
|
75
|
-
typedef typename table::c_iterator iterator;
|
77
|
+
public:
|
78
|
+
// constructors
|
76
79
|
|
77
|
-
|
80
|
+
unordered_set();
|
78
81
|
|
79
|
-
|
82
|
+
explicit unordered_set(size_type, const hasher& = hasher(),
|
83
|
+
const key_equal& = key_equal(),
|
84
|
+
const allocator_type& = allocator_type());
|
80
85
|
|
81
|
-
|
86
|
+
explicit unordered_set(size_type, const allocator_type&);
|
82
87
|
|
83
|
-
|
88
|
+
explicit unordered_set(size_type, const hasher&, const allocator_type&);
|
84
89
|
|
85
|
-
|
86
|
-
size_type = boost::unordered::detail::default_bucket_count,
|
87
|
-
const hasher& = hasher(),
|
88
|
-
const key_equal& = key_equal(),
|
89
|
-
const allocator_type& = allocator_type());
|
90
|
+
explicit unordered_set(allocator_type const&);
|
90
91
|
|
91
|
-
|
92
|
+
template <class InputIt> unordered_set(InputIt, InputIt);
|
93
|
+
|
94
|
+
template <class InputIt>
|
95
|
+
unordered_set(InputIt, InputIt, size_type, const hasher& = hasher(),
|
96
|
+
const key_equal& = key_equal());
|
92
97
|
|
93
|
-
|
94
|
-
|
98
|
+
template <class InputIt>
|
99
|
+
unordered_set(InputIt, InputIt, size_type, const hasher&, const key_equal&,
|
100
|
+
const allocator_type&);
|
95
101
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
size_type,
|
100
|
-
const hasher& = hasher(),
|
101
|
-
const key_equal& = key_equal());
|
102
|
+
template <class InputIt>
|
103
|
+
unordered_set(
|
104
|
+
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
|
102
105
|
|
103
|
-
|
104
|
-
|
105
|
-
InputIt, InputIt,
|
106
|
-
size_type,
|
107
|
-
const hasher&,
|
108
|
-
const key_equal&,
|
109
|
-
const allocator_type&);
|
106
|
+
template <class InputIt>
|
107
|
+
unordered_set(InputIt, InputIt, size_type, const allocator_type&);
|
110
108
|
|
111
|
-
|
109
|
+
// copy/move constructors
|
112
110
|
|
113
|
-
|
111
|
+
unordered_set(unordered_set const&);
|
114
112
|
|
115
|
-
|
113
|
+
unordered_set(unordered_set const&, allocator_type const&);
|
114
|
+
unordered_set(BOOST_RV_REF(unordered_set), allocator_type const&);
|
116
115
|
|
117
116
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
117
|
+
unordered_set(BOOST_RV_REF(unordered_set) other)
|
118
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
119
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
120
|
+
{
|
121
|
+
}
|
123
122
|
#elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
#endif
|
130
|
-
|
131
|
-
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
132
|
-
unordered_set(unordered_set&&, allocator_type const&);
|
123
|
+
unordered_set(unordered_set&& other)
|
124
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
125
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
126
|
+
{
|
127
|
+
}
|
133
128
|
#endif
|
134
129
|
|
135
130
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
131
|
+
unordered_set(std::initializer_list<value_type>,
|
132
|
+
size_type = boost::unordered::detail::default_bucket_count,
|
133
|
+
const hasher& = hasher(), const key_equal& l = key_equal(),
|
134
|
+
const allocator_type& = allocator_type());
|
135
|
+
unordered_set(std::initializer_list<value_type>, size_type, const hasher&,
|
136
|
+
const allocator_type&);
|
137
|
+
unordered_set(
|
138
|
+
std::initializer_list<value_type>, size_type, const allocator_type&);
|
142
139
|
#endif
|
143
140
|
|
144
|
-
|
141
|
+
// Destructor
|
145
142
|
|
146
|
-
|
143
|
+
~unordered_set() BOOST_NOEXCEPT;
|
147
144
|
|
148
|
-
|
145
|
+
// Assign
|
149
146
|
|
150
147
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
148
|
+
unordered_set& operator=(BOOST_COPY_ASSIGN_REF(unordered_set) x)
|
149
|
+
{
|
150
|
+
table_.assign(x.table_);
|
151
|
+
return *this;
|
152
|
+
}
|
156
153
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
154
|
+
unordered_set& operator=(BOOST_RV_REF(unordered_set) x)
|
155
|
+
{
|
156
|
+
table_.move_assign(x.table_);
|
157
|
+
return *this;
|
158
|
+
}
|
162
159
|
#else
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
160
|
+
unordered_set& operator=(unordered_set const& x)
|
161
|
+
{
|
162
|
+
table_.assign(x.table_);
|
163
|
+
return *this;
|
164
|
+
}
|
168
165
|
|
169
166
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
167
|
+
unordered_set& operator=(unordered_set&& x)
|
168
|
+
{
|
169
|
+
table_.move_assign(x.table_);
|
170
|
+
return *this;
|
171
|
+
}
|
175
172
|
#endif
|
176
173
|
#endif
|
177
174
|
|
178
175
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
179
|
-
|
176
|
+
unordered_set& operator=(std::initializer_list<value_type>);
|
180
177
|
#endif
|
181
178
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
179
|
+
allocator_type get_allocator() const BOOST_NOEXCEPT
|
180
|
+
{
|
181
|
+
return table_.node_alloc();
|
182
|
+
}
|
186
183
|
|
187
|
-
|
184
|
+
// size and capacity
|
188
185
|
|
189
|
-
|
190
|
-
{
|
191
|
-
return table_.size_ == 0;
|
192
|
-
}
|
186
|
+
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
193
187
|
|
194
|
-
|
195
|
-
{
|
196
|
-
return table_.size_;
|
197
|
-
}
|
188
|
+
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
198
189
|
|
199
|
-
|
190
|
+
size_type max_size() const BOOST_NOEXCEPT;
|
200
191
|
|
201
|
-
|
192
|
+
// iterators
|
202
193
|
|
203
|
-
|
204
|
-
{
|
205
|
-
return table_.begin();
|
206
|
-
}
|
194
|
+
iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
|
207
195
|
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
196
|
+
const_iterator begin() const BOOST_NOEXCEPT
|
197
|
+
{
|
198
|
+
return const_iterator(table_.begin());
|
199
|
+
}
|
212
200
|
|
213
|
-
|
214
|
-
{
|
215
|
-
return iterator();
|
216
|
-
}
|
201
|
+
iterator end() BOOST_NOEXCEPT { return iterator(); }
|
217
202
|
|
218
|
-
|
219
|
-
{
|
220
|
-
return const_iterator();
|
221
|
-
}
|
203
|
+
const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
|
222
204
|
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
205
|
+
const_iterator cbegin() const BOOST_NOEXCEPT
|
206
|
+
{
|
207
|
+
return const_iterator(table_.begin());
|
208
|
+
}
|
227
209
|
|
228
|
-
|
229
|
-
{
|
230
|
-
return const_iterator();
|
231
|
-
}
|
210
|
+
const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
|
232
211
|
|
233
|
-
|
212
|
+
// extract
|
213
|
+
|
214
|
+
node_type extract(const_iterator position)
|
215
|
+
{
|
216
|
+
return node_type(
|
217
|
+
table_.extract_by_iterator(position), table_.node_alloc());
|
218
|
+
}
|
219
|
+
|
220
|
+
node_type extract(const key_type& k)
|
221
|
+
{
|
222
|
+
return node_type(table_.extract_by_key(k), table_.node_alloc());
|
223
|
+
}
|
224
|
+
|
225
|
+
// emplace
|
234
226
|
|
235
227
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
228
|
+
template <class... Args>
|
229
|
+
std::pair<iterator, bool> emplace(BOOST_FWD_REF(Args)... args)
|
230
|
+
{
|
231
|
+
return table_.emplace(boost::forward<Args>(args)...);
|
232
|
+
}
|
241
233
|
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
234
|
+
template <class... Args>
|
235
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
|
236
|
+
{
|
237
|
+
return table_.emplace_hint(hint, boost::forward<Args>(args)...);
|
238
|
+
}
|
247
239
|
#else
|
248
240
|
|
249
241
|
#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
|
250
242
|
|
251
|
-
|
252
|
-
|
253
|
-
|
243
|
+
// 0 argument emplace requires special treatment in case
|
244
|
+
// the container is instantiated with a value type that
|
245
|
+
// doesn't have a default constructor.
|
254
246
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
247
|
+
std::pair<iterator, bool> emplace(
|
248
|
+
boost::unordered::detail::empty_emplace =
|
249
|
+
boost::unordered::detail::empty_emplace(),
|
250
|
+
value_type v = value_type())
|
251
|
+
{
|
252
|
+
return this->emplace(boost::move(v));
|
253
|
+
}
|
262
254
|
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
}
|
255
|
+
iterator emplace_hint(const_iterator hint,
|
256
|
+
boost::unordered::detail::empty_emplace =
|
257
|
+
boost::unordered::detail::empty_emplace(),
|
258
|
+
value_type v = value_type())
|
259
|
+
{
|
260
|
+
return this->emplace_hint(hint, boost::move(v));
|
261
|
+
}
|
271
262
|
|
272
263
|
#endif
|
273
264
|
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
);
|
281
|
-
}
|
265
|
+
template <typename A0>
|
266
|
+
std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
|
267
|
+
{
|
268
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
269
|
+
boost::forward<A0>(a0)));
|
270
|
+
}
|
282
271
|
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
}
|
272
|
+
template <typename A0>
|
273
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
|
274
|
+
{
|
275
|
+
return table_.emplace_hint(
|
276
|
+
hint, boost::unordered::detail::create_emplace_args(
|
277
|
+
boost::forward<A0>(a0)));
|
278
|
+
}
|
291
279
|
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
boost::forward<A0>(a0),
|
300
|
-
boost::forward<A1>(a1))
|
301
|
-
);
|
302
|
-
}
|
280
|
+
template <typename A0, typename A1>
|
281
|
+
std::pair<iterator, bool> emplace(
|
282
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
283
|
+
{
|
284
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
285
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
286
|
+
}
|
303
287
|
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
boost::forward<A1>(a1))
|
313
|
-
).first;
|
314
|
-
}
|
288
|
+
template <typename A0, typename A1>
|
289
|
+
iterator emplace_hint(
|
290
|
+
const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
291
|
+
{
|
292
|
+
return table_.emplace_hint(
|
293
|
+
hint, boost::unordered::detail::create_emplace_args(
|
294
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
295
|
+
}
|
315
296
|
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
boost::forward<A0>(a0),
|
325
|
-
boost::forward<A1>(a1),
|
326
|
-
boost::forward<A2>(a2))
|
327
|
-
);
|
328
|
-
}
|
297
|
+
template <typename A0, typename A1, typename A2>
|
298
|
+
std::pair<iterator, bool> emplace(
|
299
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
300
|
+
{
|
301
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
302
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
303
|
+
boost::forward<A2>(a2)));
|
304
|
+
}
|
329
305
|
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
boost::forward<A1>(a1),
|
340
|
-
boost::forward<A2>(a2))
|
341
|
-
).first;
|
342
|
-
}
|
306
|
+
template <typename A0, typename A1, typename A2>
|
307
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
|
308
|
+
BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
309
|
+
{
|
310
|
+
return table_.emplace_hint(
|
311
|
+
hint, boost::unordered::detail::create_emplace_args(
|
312
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
313
|
+
boost::forward<A2>(a2)));
|
314
|
+
}
|
343
315
|
|
344
|
-
#define BOOST_UNORDERED_EMPLACE(z, n, _)
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
)
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
> \
|
362
|
-
iterator emplace_hint( \
|
363
|
-
const_iterator, \
|
364
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
365
|
-
) \
|
366
|
-
{ \
|
367
|
-
return table_.emplace( \
|
368
|
-
boost::unordered::detail::create_emplace_args( \
|
369
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
370
|
-
a) \
|
371
|
-
)).first; \
|
372
|
-
}
|
316
|
+
#define BOOST_UNORDERED_EMPLACE(z, n, _) \
|
317
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
318
|
+
std::pair<iterator, bool> emplace( \
|
319
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
320
|
+
{ \
|
321
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args( \
|
322
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
323
|
+
} \
|
324
|
+
\
|
325
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
326
|
+
iterator emplace_hint(const_iterator hint, \
|
327
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
328
|
+
{ \
|
329
|
+
return table_.emplace_hint( \
|
330
|
+
hint, boost::unordered::detail::create_emplace_args( \
|
331
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
332
|
+
}
|
373
333
|
|
374
|
-
|
375
|
-
|
334
|
+
BOOST_PP_REPEAT_FROM_TO(
|
335
|
+
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
376
336
|
|
377
337
|
#undef BOOST_UNORDERED_EMPLACE
|
378
338
|
|
379
339
|
#endif
|
380
340
|
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
341
|
+
std::pair<iterator, bool> insert(value_type const& x)
|
342
|
+
{
|
343
|
+
return this->emplace(x);
|
344
|
+
}
|
385
345
|
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
346
|
+
std::pair<iterator, bool> insert(BOOST_UNORDERED_RV_REF(value_type) x)
|
347
|
+
{
|
348
|
+
return this->emplace(boost::move(x));
|
349
|
+
}
|
390
350
|
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
351
|
+
iterator insert(const_iterator hint, value_type const& x)
|
352
|
+
{
|
353
|
+
return this->emplace_hint(hint, x);
|
354
|
+
}
|
395
355
|
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
}
|
356
|
+
iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x)
|
357
|
+
{
|
358
|
+
return this->emplace_hint(hint, boost::move(x));
|
359
|
+
}
|
401
360
|
|
402
|
-
|
361
|
+
template <class InputIt> void insert(InputIt, InputIt);
|
403
362
|
|
404
363
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
405
|
-
|
364
|
+
void insert(std::initializer_list<value_type>);
|
406
365
|
#endif
|
407
366
|
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
367
|
+
insert_return_type insert(BOOST_RV_REF(node_type) np)
|
368
|
+
{
|
369
|
+
insert_return_type result;
|
370
|
+
table_.move_insert_node_type(np, result);
|
371
|
+
return boost::move(result);
|
372
|
+
}
|
413
373
|
|
414
|
-
|
415
|
-
|
374
|
+
iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
|
375
|
+
{
|
376
|
+
return table_.move_insert_node_type_with_hint(hint, np);
|
377
|
+
}
|
416
378
|
|
417
|
-
|
379
|
+
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
380
|
+
private:
|
381
|
+
// Note: Use r-value node_type to insert.
|
382
|
+
insert_return_type insert(node_type&);
|
383
|
+
iterator insert(const_iterator, node_type& np);
|
418
384
|
|
419
|
-
|
420
|
-
|
385
|
+
public:
|
386
|
+
#endif
|
421
387
|
|
422
|
-
|
388
|
+
iterator erase(const_iterator);
|
389
|
+
size_type erase(const key_type&);
|
390
|
+
iterator erase(const_iterator, const_iterator);
|
391
|
+
void quick_erase(const_iterator it) { erase(it); }
|
392
|
+
void erase_return_void(const_iterator it) { erase(it); }
|
423
393
|
|
424
|
-
|
394
|
+
void clear();
|
395
|
+
void swap(unordered_set&);
|
425
396
|
|
426
|
-
|
427
|
-
|
428
|
-
const_iterator find(
|
429
|
-
CompatibleKey const&,
|
430
|
-
CompatibleHash const&,
|
431
|
-
CompatiblePredicate const&) const;
|
397
|
+
template <typename H2, typename P2>
|
398
|
+
void merge(boost::unordered_set<T, H2, P2, A>& source);
|
432
399
|
|
433
|
-
|
400
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
401
|
+
template <typename H2, typename P2>
|
402
|
+
void merge(boost::unordered_set<T, H2, P2, A>&& source);
|
403
|
+
#endif
|
434
404
|
|
435
|
-
|
436
|
-
|
405
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
406
|
+
template <typename H2, typename P2>
|
407
|
+
void merge(boost::unordered_multiset<T, H2, P2, A>& source);
|
437
408
|
|
438
|
-
|
409
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
410
|
+
template <typename H2, typename P2>
|
411
|
+
void merge(boost::unordered_multiset<T, H2, P2, A>&& source);
|
412
|
+
#endif
|
413
|
+
#endif
|
439
414
|
|
440
|
-
|
441
|
-
{
|
442
|
-
return table_.bucket_count_;
|
443
|
-
}
|
415
|
+
// observers
|
444
416
|
|
445
|
-
|
446
|
-
|
447
|
-
return table_.max_bucket_count();
|
448
|
-
}
|
417
|
+
hasher hash_function() const;
|
418
|
+
key_equal key_eq() const;
|
449
419
|
|
450
|
-
|
420
|
+
// lookup
|
451
421
|
|
452
|
-
|
453
|
-
{
|
454
|
-
return table_.hash_to_bucket(table_.hash(k));
|
455
|
-
}
|
422
|
+
const_iterator find(const key_type&) const;
|
456
423
|
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
}
|
424
|
+
template <class CompatibleKey, class CompatibleHash,
|
425
|
+
class CompatiblePredicate>
|
426
|
+
const_iterator find(CompatibleKey const&, CompatibleHash const&,
|
427
|
+
CompatiblePredicate const&) const;
|
462
428
|
|
463
|
-
|
464
|
-
{
|
465
|
-
return const_local_iterator(
|
466
|
-
table_.begin(n), n, table_.bucket_count_);
|
467
|
-
}
|
429
|
+
size_type count(const key_type&) const;
|
468
430
|
|
469
|
-
|
470
|
-
|
471
|
-
return local_iterator();
|
472
|
-
}
|
431
|
+
std::pair<const_iterator, const_iterator> equal_range(
|
432
|
+
const key_type&) const;
|
473
433
|
|
474
|
-
|
475
|
-
{
|
476
|
-
return const_local_iterator();
|
477
|
-
}
|
434
|
+
// bucket interface
|
478
435
|
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
}
|
436
|
+
size_type bucket_count() const BOOST_NOEXCEPT
|
437
|
+
{
|
438
|
+
return table_.bucket_count_;
|
439
|
+
}
|
484
440
|
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
441
|
+
size_type max_bucket_count() const BOOST_NOEXCEPT
|
442
|
+
{
|
443
|
+
return table_.max_bucket_count();
|
444
|
+
}
|
489
445
|
|
490
|
-
|
446
|
+
size_type bucket_size(size_type) const;
|
491
447
|
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
448
|
+
size_type bucket(const key_type& k) const
|
449
|
+
{
|
450
|
+
return table_.hash_to_bucket(table_.hash(k));
|
451
|
+
}
|
452
|
+
|
453
|
+
local_iterator begin(size_type n)
|
454
|
+
{
|
455
|
+
return local_iterator(table_.begin(n), n, table_.bucket_count_);
|
456
|
+
}
|
457
|
+
|
458
|
+
const_local_iterator begin(size_type n) const
|
459
|
+
{
|
460
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
461
|
+
}
|
462
|
+
|
463
|
+
local_iterator end(size_type) { return local_iterator(); }
|
464
|
+
|
465
|
+
const_local_iterator end(size_type) const { return const_local_iterator(); }
|
466
|
+
|
467
|
+
const_local_iterator cbegin(size_type n) const
|
468
|
+
{
|
469
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
470
|
+
}
|
471
|
+
|
472
|
+
const_local_iterator cend(size_type) const
|
473
|
+
{
|
474
|
+
return const_local_iterator();
|
475
|
+
}
|
476
|
+
|
477
|
+
// hash policy
|
478
|
+
|
479
|
+
float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
|
496
480
|
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
481
|
+
float load_factor() const BOOST_NOEXCEPT;
|
482
|
+
void max_load_factor(float) BOOST_NOEXCEPT;
|
483
|
+
void rehash(size_type);
|
484
|
+
void reserve(size_type);
|
501
485
|
|
502
486
|
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
487
|
+
friend bool operator==
|
488
|
+
<T, H, P, A>(unordered_set const&, unordered_set const&);
|
489
|
+
friend bool operator!=
|
490
|
+
<T, H, P, A>(unordered_set const&, unordered_set const&);
|
507
491
|
#endif
|
508
|
-
|
492
|
+
}; // class template unordered_set
|
509
493
|
|
510
|
-
|
511
|
-
|
512
|
-
{
|
494
|
+
template <class T, class H, class P, class A> class unordered_multiset
|
495
|
+
{
|
513
496
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
514
|
-
|
497
|
+
BOOST_COPYABLE_AND_MOVABLE(unordered_multiset)
|
515
498
|
#endif
|
516
|
-
|
499
|
+
template <typename, typename, typename, typename>
|
500
|
+
friend class unordered_set;
|
517
501
|
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
502
|
+
public:
|
503
|
+
typedef T key_type;
|
504
|
+
typedef T value_type;
|
505
|
+
typedef H hasher;
|
506
|
+
typedef P key_equal;
|
507
|
+
typedef A allocator_type;
|
523
508
|
|
524
|
-
|
509
|
+
private:
|
510
|
+
typedef boost::unordered::detail::multiset<A, T, H, P> types;
|
511
|
+
typedef typename types::value_allocator_traits value_allocator_traits;
|
512
|
+
typedef typename types::table table;
|
525
513
|
|
526
|
-
|
527
|
-
|
528
|
-
|
514
|
+
public:
|
515
|
+
typedef typename value_allocator_traits::pointer pointer;
|
516
|
+
typedef typename value_allocator_traits::const_pointer const_pointer;
|
529
517
|
|
530
|
-
|
518
|
+
typedef value_type& reference;
|
519
|
+
typedef value_type const& const_reference;
|
531
520
|
|
532
|
-
|
533
|
-
|
521
|
+
typedef std::size_t size_type;
|
522
|
+
typedef std::ptrdiff_t difference_type;
|
534
523
|
|
535
|
-
|
536
|
-
|
524
|
+
typedef typename table::cl_iterator const_local_iterator;
|
525
|
+
typedef typename table::l_iterator local_iterator;
|
526
|
+
typedef typename table::c_iterator const_iterator;
|
527
|
+
typedef typename table::iterator iterator;
|
528
|
+
typedef typename types::node_type node_type;
|
537
529
|
|
538
|
-
|
539
|
-
|
530
|
+
private:
|
531
|
+
table table_;
|
540
532
|
|
541
|
-
|
542
|
-
|
543
|
-
typedef typename table::c_iterator const_iterator;
|
544
|
-
typedef typename table::c_iterator iterator;
|
533
|
+
public:
|
534
|
+
// constructors
|
545
535
|
|
546
|
-
|
536
|
+
unordered_multiset();
|
547
537
|
|
548
|
-
|
538
|
+
explicit unordered_multiset(size_type, const hasher& = hasher(),
|
539
|
+
const key_equal& = key_equal(),
|
540
|
+
const allocator_type& = allocator_type());
|
549
541
|
|
550
|
-
|
542
|
+
explicit unordered_multiset(size_type, const allocator_type&);
|
551
543
|
|
552
|
-
|
544
|
+
explicit unordered_multiset(
|
545
|
+
size_type, const hasher&, const allocator_type&);
|
553
546
|
|
554
|
-
|
555
|
-
size_type = boost::unordered::detail::default_bucket_count,
|
556
|
-
const hasher& = hasher(),
|
557
|
-
const key_equal& = key_equal(),
|
558
|
-
const allocator_type& = allocator_type());
|
547
|
+
explicit unordered_multiset(allocator_type const&);
|
559
548
|
|
560
|
-
|
549
|
+
template <class InputIt> unordered_multiset(InputIt, InputIt);
|
561
550
|
|
562
|
-
|
563
|
-
|
551
|
+
template <class InputIt>
|
552
|
+
unordered_multiset(InputIt, InputIt, size_type, const hasher& = hasher(),
|
553
|
+
const key_equal& = key_equal());
|
554
|
+
|
555
|
+
template <class InputIt>
|
556
|
+
unordered_multiset(InputIt, InputIt, size_type, const hasher&,
|
557
|
+
const key_equal&, const allocator_type&);
|
564
558
|
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
size_type,
|
569
|
-
const hasher& = hasher(),
|
570
|
-
const key_equal& = key_equal());
|
559
|
+
template <class InputIt>
|
560
|
+
unordered_multiset(
|
561
|
+
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
|
571
562
|
|
572
|
-
|
573
|
-
|
574
|
-
InputIt, InputIt,
|
575
|
-
size_type,
|
576
|
-
const hasher&,
|
577
|
-
const key_equal&,
|
578
|
-
const allocator_type&);
|
563
|
+
template <class InputIt>
|
564
|
+
unordered_multiset(InputIt, InputIt, size_type, const allocator_type&);
|
579
565
|
|
580
|
-
|
566
|
+
// copy/move constructors
|
581
567
|
|
582
|
-
|
568
|
+
unordered_multiset(unordered_multiset const&);
|
583
569
|
|
584
|
-
|
570
|
+
unordered_multiset(unordered_multiset const&, allocator_type const&);
|
571
|
+
unordered_multiset(BOOST_RV_REF(unordered_multiset), allocator_type const&);
|
585
572
|
|
586
573
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
574
|
+
unordered_multiset(BOOST_RV_REF(unordered_multiset) other)
|
575
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
576
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
577
|
+
{
|
578
|
+
}
|
592
579
|
#elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
#endif
|
599
|
-
|
600
|
-
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
601
|
-
unordered_multiset(unordered_multiset&&, allocator_type const&);
|
580
|
+
unordered_multiset(unordered_multiset&& other)
|
581
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
582
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
583
|
+
{
|
584
|
+
}
|
602
585
|
#endif
|
603
586
|
|
604
587
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
588
|
+
unordered_multiset(std::initializer_list<value_type>,
|
589
|
+
size_type = boost::unordered::detail::default_bucket_count,
|
590
|
+
const hasher& = hasher(), const key_equal& l = key_equal(),
|
591
|
+
const allocator_type& = allocator_type());
|
592
|
+
unordered_multiset(std::initializer_list<value_type>, size_type,
|
593
|
+
const hasher&, const allocator_type&);
|
594
|
+
unordered_multiset(
|
595
|
+
std::initializer_list<value_type>, size_type, const allocator_type&);
|
611
596
|
#endif
|
612
597
|
|
613
|
-
|
598
|
+
// Destructor
|
614
599
|
|
615
|
-
|
600
|
+
~unordered_multiset() BOOST_NOEXCEPT;
|
616
601
|
|
617
|
-
|
602
|
+
// Assign
|
618
603
|
|
619
604
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
}
|
605
|
+
unordered_multiset& operator=(BOOST_COPY_ASSIGN_REF(unordered_multiset) x)
|
606
|
+
{
|
607
|
+
table_.assign(x.table_);
|
608
|
+
return *this;
|
609
|
+
}
|
626
610
|
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
611
|
+
unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x)
|
612
|
+
{
|
613
|
+
table_.move_assign(x.table_);
|
614
|
+
return *this;
|
615
|
+
}
|
632
616
|
#else
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
617
|
+
unordered_multiset& operator=(unordered_multiset const& x)
|
618
|
+
{
|
619
|
+
table_.assign(x.table_);
|
620
|
+
return *this;
|
621
|
+
}
|
638
622
|
|
639
623
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
624
|
+
unordered_multiset& operator=(unordered_multiset&& x)
|
625
|
+
{
|
626
|
+
table_.move_assign(x.table_);
|
627
|
+
return *this;
|
628
|
+
}
|
645
629
|
#endif
|
646
630
|
#endif
|
647
631
|
|
648
632
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
649
|
-
|
633
|
+
unordered_multiset& operator=(std::initializer_list<value_type>);
|
650
634
|
#endif
|
651
635
|
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
636
|
+
allocator_type get_allocator() const BOOST_NOEXCEPT
|
637
|
+
{
|
638
|
+
return table_.node_alloc();
|
639
|
+
}
|
656
640
|
|
657
|
-
|
641
|
+
// size and capacity
|
658
642
|
|
659
|
-
|
660
|
-
{
|
661
|
-
return table_.size_ == 0;
|
662
|
-
}
|
643
|
+
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
663
644
|
|
664
|
-
|
665
|
-
{
|
666
|
-
return table_.size_;
|
667
|
-
}
|
645
|
+
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
668
646
|
|
669
|
-
|
647
|
+
size_type max_size() const BOOST_NOEXCEPT;
|
670
648
|
|
671
|
-
|
649
|
+
// iterators
|
672
650
|
|
673
|
-
|
674
|
-
{
|
675
|
-
return iterator(table_.begin());
|
676
|
-
}
|
651
|
+
iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
|
677
652
|
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
653
|
+
const_iterator begin() const BOOST_NOEXCEPT
|
654
|
+
{
|
655
|
+
return const_iterator(table_.begin());
|
656
|
+
}
|
682
657
|
|
683
|
-
|
684
|
-
{
|
685
|
-
return iterator();
|
686
|
-
}
|
658
|
+
iterator end() BOOST_NOEXCEPT { return iterator(); }
|
687
659
|
|
688
|
-
|
689
|
-
{
|
690
|
-
return const_iterator();
|
691
|
-
}
|
660
|
+
const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
|
692
661
|
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
662
|
+
const_iterator cbegin() const BOOST_NOEXCEPT
|
663
|
+
{
|
664
|
+
return const_iterator(table_.begin());
|
665
|
+
}
|
697
666
|
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
667
|
+
const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
|
668
|
+
|
669
|
+
// extract
|
670
|
+
|
671
|
+
node_type extract(const_iterator position)
|
672
|
+
{
|
673
|
+
return node_type(
|
674
|
+
table_.extract_by_iterator(position), table_.node_alloc());
|
675
|
+
}
|
676
|
+
|
677
|
+
node_type extract(const key_type& k)
|
678
|
+
{
|
679
|
+
return node_type(table_.extract_by_key(k), table_.node_alloc());
|
680
|
+
}
|
702
681
|
|
703
|
-
|
682
|
+
// emplace
|
704
683
|
|
705
684
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
}
|
685
|
+
template <class... Args> iterator emplace(BOOST_FWD_REF(Args)... args)
|
686
|
+
{
|
687
|
+
return table_.emplace(boost::forward<Args>(args)...);
|
688
|
+
}
|
711
689
|
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
690
|
+
template <class... Args>
|
691
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
|
692
|
+
{
|
693
|
+
return table_.emplace_hint(hint, boost::forward<Args>(args)...);
|
694
|
+
}
|
717
695
|
#else
|
718
696
|
|
719
697
|
#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
|
720
698
|
|
721
|
-
|
722
|
-
|
723
|
-
|
699
|
+
// 0 argument emplace requires special treatment in case
|
700
|
+
// the container is instantiated with a value type that
|
701
|
+
// doesn't have a default constructor.
|
724
702
|
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
}
|
703
|
+
iterator emplace(boost::unordered::detail::empty_emplace =
|
704
|
+
boost::unordered::detail::empty_emplace(),
|
705
|
+
value_type v = value_type())
|
706
|
+
{
|
707
|
+
return this->emplace(boost::move(v));
|
708
|
+
}
|
732
709
|
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
}
|
710
|
+
iterator emplace_hint(const_iterator hint,
|
711
|
+
boost::unordered::detail::empty_emplace =
|
712
|
+
boost::unordered::detail::empty_emplace(),
|
713
|
+
value_type v = value_type())
|
714
|
+
{
|
715
|
+
return this->emplace_hint(hint, boost::move(v));
|
716
|
+
}
|
741
717
|
|
742
718
|
#endif
|
743
719
|
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
boost::forward<A0>(a0))
|
750
|
-
);
|
751
|
-
}
|
720
|
+
template <typename A0> iterator emplace(BOOST_FWD_REF(A0) a0)
|
721
|
+
{
|
722
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
723
|
+
boost::forward<A0>(a0)));
|
724
|
+
}
|
752
725
|
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
}
|
726
|
+
template <typename A0>
|
727
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
|
728
|
+
{
|
729
|
+
return table_.emplace_hint(
|
730
|
+
hint, boost::unordered::detail::create_emplace_args(
|
731
|
+
boost::forward<A0>(a0)));
|
732
|
+
}
|
761
733
|
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
boost::unordered::detail::create_emplace_args(
|
769
|
-
boost::forward<A0>(a0),
|
770
|
-
boost::forward<A1>(a1))
|
771
|
-
);
|
772
|
-
}
|
734
|
+
template <typename A0, typename A1>
|
735
|
+
iterator emplace(BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
736
|
+
{
|
737
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
738
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
739
|
+
}
|
773
740
|
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
boost::forward<A1>(a1))
|
783
|
-
);
|
784
|
-
}
|
741
|
+
template <typename A0, typename A1>
|
742
|
+
iterator emplace_hint(
|
743
|
+
const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
744
|
+
{
|
745
|
+
return table_.emplace_hint(
|
746
|
+
hint, boost::unordered::detail::create_emplace_args(
|
747
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
748
|
+
}
|
785
749
|
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
boost::forward<A0>(a0),
|
795
|
-
boost::forward<A1>(a1),
|
796
|
-
boost::forward<A2>(a2))
|
797
|
-
);
|
798
|
-
}
|
750
|
+
template <typename A0, typename A1, typename A2>
|
751
|
+
iterator emplace(
|
752
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
753
|
+
{
|
754
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
755
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
756
|
+
boost::forward<A2>(a2)));
|
757
|
+
}
|
799
758
|
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
boost::forward<A1>(a1),
|
810
|
-
boost::forward<A2>(a2))
|
811
|
-
);
|
812
|
-
}
|
759
|
+
template <typename A0, typename A1, typename A2>
|
760
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
|
761
|
+
BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
762
|
+
{
|
763
|
+
return table_.emplace_hint(
|
764
|
+
hint, boost::unordered::detail::create_emplace_args(
|
765
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
766
|
+
boost::forward<A2>(a2)));
|
767
|
+
}
|
813
768
|
|
814
|
-
#define BOOST_UNORDERED_EMPLACE(z, n, _)
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
831
|
-
> \
|
832
|
-
iterator emplace_hint( \
|
833
|
-
const_iterator, \
|
834
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
835
|
-
) \
|
836
|
-
{ \
|
837
|
-
return table_.emplace( \
|
838
|
-
boost::unordered::detail::create_emplace_args( \
|
839
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
840
|
-
a) \
|
841
|
-
)); \
|
842
|
-
}
|
769
|
+
#define BOOST_UNORDERED_EMPLACE(z, n, _) \
|
770
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
771
|
+
iterator emplace(BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
772
|
+
{ \
|
773
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args( \
|
774
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
775
|
+
} \
|
776
|
+
\
|
777
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
778
|
+
iterator emplace_hint(const_iterator hint, \
|
779
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
780
|
+
{ \
|
781
|
+
return table_.emplace_hint( \
|
782
|
+
hint, boost::unordered::detail::create_emplace_args( \
|
783
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
784
|
+
}
|
843
785
|
|
844
|
-
|
845
|
-
|
786
|
+
BOOST_PP_REPEAT_FROM_TO(
|
787
|
+
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
846
788
|
|
847
789
|
#undef BOOST_UNORDERED_EMPLACE
|
848
790
|
|
849
791
|
#endif
|
850
792
|
|
851
|
-
|
852
|
-
{
|
853
|
-
return this->emplace(x);
|
854
|
-
}
|
793
|
+
iterator insert(value_type const& x) { return this->emplace(x); }
|
855
794
|
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
795
|
+
iterator insert(BOOST_UNORDERED_RV_REF(value_type) x)
|
796
|
+
{
|
797
|
+
return this->emplace(boost::move(x));
|
798
|
+
}
|
860
799
|
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
800
|
+
iterator insert(const_iterator hint, value_type const& x)
|
801
|
+
{
|
802
|
+
return this->emplace_hint(hint, x);
|
803
|
+
}
|
865
804
|
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
}
|
805
|
+
iterator insert(const_iterator hint, BOOST_UNORDERED_RV_REF(value_type) x)
|
806
|
+
{
|
807
|
+
return this->emplace_hint(hint, boost::move(x));
|
808
|
+
}
|
871
809
|
|
872
|
-
|
810
|
+
template <class InputIt> void insert(InputIt, InputIt);
|
873
811
|
|
874
812
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
875
|
-
|
813
|
+
void insert(std::initializer_list<value_type>);
|
876
814
|
#endif
|
877
815
|
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
void erase_return_void(const_iterator it) { erase(it); }
|
816
|
+
iterator insert(BOOST_RV_REF(node_type) np)
|
817
|
+
{
|
818
|
+
return table_.move_insert_node_type(np);
|
819
|
+
}
|
883
820
|
|
884
|
-
|
885
|
-
|
821
|
+
iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
|
822
|
+
{
|
823
|
+
return table_.move_insert_node_type_with_hint(hint, np);
|
824
|
+
}
|
886
825
|
|
887
|
-
|
826
|
+
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
827
|
+
private:
|
828
|
+
// Note: Use r-value node_type to insert.
|
829
|
+
iterator insert(node_type&);
|
830
|
+
iterator insert(const_iterator, node_type& np);
|
888
831
|
|
889
|
-
|
890
|
-
|
832
|
+
public:
|
833
|
+
#endif
|
891
834
|
|
892
|
-
|
835
|
+
iterator erase(const_iterator);
|
836
|
+
size_type erase(const key_type&);
|
837
|
+
iterator erase(const_iterator, const_iterator);
|
838
|
+
void quick_erase(const_iterator it) { erase(it); }
|
839
|
+
void erase_return_void(const_iterator it) { erase(it); }
|
893
840
|
|
894
|
-
|
841
|
+
void clear();
|
842
|
+
void swap(unordered_multiset&);
|
895
843
|
|
896
|
-
|
897
|
-
|
898
|
-
const_iterator find(
|
899
|
-
CompatibleKey const&,
|
900
|
-
CompatibleHash const&,
|
901
|
-
CompatiblePredicate const&) const;
|
844
|
+
template <typename H2, typename P2>
|
845
|
+
void merge(boost::unordered_multiset<T, H2, P2, A>& source);
|
902
846
|
|
903
|
-
|
847
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
848
|
+
template <typename H2, typename P2>
|
849
|
+
void merge(boost::unordered_multiset<T, H2, P2, A>&& source);
|
850
|
+
#endif
|
904
851
|
|
905
|
-
|
906
|
-
|
852
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
853
|
+
template <typename H2, typename P2>
|
854
|
+
void merge(boost::unordered_set<T, H2, P2, A>& source);
|
907
855
|
|
908
|
-
|
856
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
857
|
+
template <typename H2, typename P2>
|
858
|
+
void merge(boost::unordered_set<T, H2, P2, A>&& source);
|
859
|
+
#endif
|
860
|
+
#endif
|
909
861
|
|
910
|
-
|
911
|
-
{
|
912
|
-
return table_.bucket_count_;
|
913
|
-
}
|
862
|
+
// observers
|
914
863
|
|
915
|
-
|
916
|
-
|
917
|
-
return table_.max_bucket_count();
|
918
|
-
}
|
864
|
+
hasher hash_function() const;
|
865
|
+
key_equal key_eq() const;
|
919
866
|
|
920
|
-
|
921
|
-
|
922
|
-
size_type bucket(const key_type& k) const
|
923
|
-
{
|
924
|
-
return table_.hash_to_bucket(table_.hash(k));
|
925
|
-
}
|
926
|
-
|
927
|
-
local_iterator begin(size_type n)
|
928
|
-
{
|
929
|
-
return local_iterator(
|
930
|
-
table_.begin(n), n, table_.bucket_count_);
|
931
|
-
}
|
932
|
-
|
933
|
-
const_local_iterator begin(size_type n) const
|
934
|
-
{
|
935
|
-
return const_local_iterator(
|
936
|
-
table_.begin(n), n, table_.bucket_count_);
|
937
|
-
}
|
938
|
-
|
939
|
-
local_iterator end(size_type)
|
940
|
-
{
|
941
|
-
return local_iterator();
|
942
|
-
}
|
943
|
-
|
944
|
-
const_local_iterator end(size_type) const
|
945
|
-
{
|
946
|
-
return const_local_iterator();
|
947
|
-
}
|
948
|
-
|
949
|
-
const_local_iterator cbegin(size_type n) const
|
950
|
-
{
|
951
|
-
return const_local_iterator(
|
952
|
-
table_.begin(n), n, table_.bucket_count_);
|
953
|
-
}
|
954
|
-
|
955
|
-
const_local_iterator cend(size_type) const
|
956
|
-
{
|
957
|
-
return const_local_iterator();
|
958
|
-
}
|
867
|
+
// lookup
|
959
868
|
|
960
|
-
|
869
|
+
const_iterator find(const key_type&) const;
|
961
870
|
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
871
|
+
template <class CompatibleKey, class CompatibleHash,
|
872
|
+
class CompatiblePredicate>
|
873
|
+
const_iterator find(CompatibleKey const&, CompatibleHash const&,
|
874
|
+
CompatiblePredicate const&) const;
|
966
875
|
|
967
|
-
|
968
|
-
void max_load_factor(float) BOOST_NOEXCEPT;
|
969
|
-
void rehash(size_type);
|
970
|
-
void reserve(size_type);
|
876
|
+
size_type count(const key_type&) const;
|
971
877
|
|
972
|
-
|
973
|
-
|
974
|
-
unordered_multiset const&, unordered_multiset const&);
|
975
|
-
friend bool operator!=<T,H,P,A>(
|
976
|
-
unordered_multiset const&, unordered_multiset const&);
|
977
|
-
#endif
|
978
|
-
}; // class template unordered_multiset
|
878
|
+
std::pair<const_iterator, const_iterator> equal_range(
|
879
|
+
const key_type&) const;
|
979
880
|
|
980
|
-
|
881
|
+
// bucket interface
|
981
882
|
|
982
|
-
|
983
|
-
unordered_set<T,H,P,A>::unordered_set(
|
984
|
-
size_type n, const hasher &hf, const key_equal &eql,
|
985
|
-
const allocator_type &a)
|
986
|
-
: table_(n, hf, eql, a)
|
883
|
+
size_type bucket_count() const BOOST_NOEXCEPT
|
987
884
|
{
|
885
|
+
return table_.bucket_count_;
|
988
886
|
}
|
989
887
|
|
990
|
-
|
991
|
-
unordered_set<T,H,P,A>::unordered_set(allocator_type const& a)
|
992
|
-
: table_(boost::unordered::detail::default_bucket_count,
|
993
|
-
hasher(), key_equal(), a)
|
888
|
+
size_type max_bucket_count() const BOOST_NOEXCEPT
|
994
889
|
{
|
890
|
+
return table_.max_bucket_count();
|
995
891
|
}
|
996
892
|
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
: table_(other.table_, a)
|
893
|
+
size_type bucket_size(size_type) const;
|
894
|
+
|
895
|
+
size_type bucket(const key_type& k) const
|
1001
896
|
{
|
897
|
+
return table_.hash_to_bucket(table_.hash(k));
|
1002
898
|
}
|
1003
899
|
|
1004
|
-
|
1005
|
-
template <class InputIt>
|
1006
|
-
unordered_set<T,H,P,A>::unordered_set(InputIt f, InputIt l)
|
1007
|
-
: table_(boost::unordered::detail::initial_size(f, l),
|
1008
|
-
hasher(), key_equal(), allocator_type())
|
900
|
+
local_iterator begin(size_type n)
|
1009
901
|
{
|
1010
|
-
table_.
|
902
|
+
return local_iterator(table_.begin(n), n, table_.bucket_count_);
|
1011
903
|
}
|
1012
904
|
|
1013
|
-
|
1014
|
-
template <class InputIt>
|
1015
|
-
unordered_set<T,H,P,A>::unordered_set(
|
1016
|
-
InputIt f, InputIt l,
|
1017
|
-
size_type n,
|
1018
|
-
const hasher &hf,
|
1019
|
-
const key_equal &eql)
|
1020
|
-
: table_(boost::unordered::detail::initial_size(f, l, n),
|
1021
|
-
hf, eql, allocator_type())
|
1022
|
-
{
|
1023
|
-
table_.insert_range(f, l);
|
1024
|
-
}
|
1025
|
-
|
1026
|
-
template <class T, class H, class P, class A>
|
1027
|
-
template <class InputIt>
|
1028
|
-
unordered_set<T,H,P,A>::unordered_set(
|
1029
|
-
InputIt f, InputIt l,
|
1030
|
-
size_type n,
|
1031
|
-
const hasher &hf,
|
1032
|
-
const key_equal &eql,
|
1033
|
-
const allocator_type &a)
|
1034
|
-
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
905
|
+
const_local_iterator begin(size_type n) const
|
1035
906
|
{
|
1036
|
-
table_.
|
907
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
1037
908
|
}
|
1038
|
-
|
1039
|
-
template <class T, class H, class P, class A>
|
1040
|
-
unordered_set<T,H,P,A>::~unordered_set() BOOST_NOEXCEPT {}
|
1041
909
|
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
910
|
+
local_iterator end(size_type) { return local_iterator(); }
|
911
|
+
|
912
|
+
const_local_iterator end(size_type) const { return const_local_iterator(); }
|
913
|
+
|
914
|
+
const_local_iterator cbegin(size_type n) const
|
1046
915
|
{
|
916
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
1047
917
|
}
|
1048
918
|
|
1049
|
-
|
1050
|
-
|
1051
|
-
template <class T, class H, class P, class A>
|
1052
|
-
unordered_set<T,H,P,A>::unordered_set(
|
1053
|
-
unordered_set&& other, allocator_type const& a)
|
1054
|
-
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
919
|
+
const_local_iterator cend(size_type) const
|
1055
920
|
{
|
921
|
+
return const_local_iterator();
|
1056
922
|
}
|
1057
923
|
|
924
|
+
// hash policy
|
925
|
+
|
926
|
+
float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
|
927
|
+
|
928
|
+
float load_factor() const BOOST_NOEXCEPT;
|
929
|
+
void max_load_factor(float) BOOST_NOEXCEPT;
|
930
|
+
void rehash(size_type);
|
931
|
+
void reserve(size_type);
|
932
|
+
|
933
|
+
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
934
|
+
friend bool operator==
|
935
|
+
<T, H, P, A>(unordered_multiset const&, unordered_multiset const&);
|
936
|
+
friend bool operator!=
|
937
|
+
<T, H, P, A>(unordered_multiset const&, unordered_multiset const&);
|
1058
938
|
#endif
|
939
|
+
}; // class template unordered_multiset
|
940
|
+
|
941
|
+
////////////////////////////////////////////////////////////////////////////////
|
942
|
+
|
943
|
+
template <class T, class H, class P, class A>
|
944
|
+
unordered_set<T, H, P, A>::unordered_set()
|
945
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
946
|
+
key_equal(), allocator_type())
|
947
|
+
{
|
948
|
+
}
|
949
|
+
|
950
|
+
template <class T, class H, class P, class A>
|
951
|
+
unordered_set<T, H, P, A>::unordered_set(size_type n, const hasher& hf,
|
952
|
+
const key_equal& eql, const allocator_type& a)
|
953
|
+
: table_(n, hf, eql, a)
|
954
|
+
{
|
955
|
+
}
|
956
|
+
|
957
|
+
template <class T, class H, class P, class A>
|
958
|
+
unordered_set<T, H, P, A>::unordered_set(size_type n, const allocator_type& a)
|
959
|
+
: table_(n, hasher(), key_equal(), a)
|
960
|
+
{
|
961
|
+
}
|
962
|
+
|
963
|
+
template <class T, class H, class P, class A>
|
964
|
+
unordered_set<T, H, P, A>::unordered_set(
|
965
|
+
size_type n, const hasher& hf, const allocator_type& a)
|
966
|
+
: table_(n, hf, key_equal(), a)
|
967
|
+
{
|
968
|
+
}
|
969
|
+
|
970
|
+
template <class T, class H, class P, class A>
|
971
|
+
unordered_set<T, H, P, A>::unordered_set(allocator_type const& a)
|
972
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
973
|
+
key_equal(), a)
|
974
|
+
{
|
975
|
+
}
|
976
|
+
|
977
|
+
template <class T, class H, class P, class A>
|
978
|
+
unordered_set<T, H, P, A>::unordered_set(
|
979
|
+
unordered_set const& other, allocator_type const& a)
|
980
|
+
: table_(other.table_, a)
|
981
|
+
{
|
982
|
+
}
|
983
|
+
|
984
|
+
template <class T, class H, class P, class A>
|
985
|
+
template <class InputIt>
|
986
|
+
unordered_set<T, H, P, A>::unordered_set(InputIt f, InputIt l)
|
987
|
+
: table_(boost::unordered::detail::initial_size(f, l), hasher(),
|
988
|
+
key_equal(), allocator_type())
|
989
|
+
{
|
990
|
+
table_.insert_range(f, l);
|
991
|
+
}
|
992
|
+
|
993
|
+
template <class T, class H, class P, class A>
|
994
|
+
template <class InputIt>
|
995
|
+
unordered_set<T, H, P, A>::unordered_set(
|
996
|
+
InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
|
997
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
|
998
|
+
allocator_type())
|
999
|
+
{
|
1000
|
+
table_.insert_range(f, l);
|
1001
|
+
}
|
1002
|
+
|
1003
|
+
template <class T, class H, class P, class A>
|
1004
|
+
template <class InputIt>
|
1005
|
+
unordered_set<T, H, P, A>::unordered_set(InputIt f, InputIt l, size_type n,
|
1006
|
+
const hasher& hf, const key_equal& eql, const allocator_type& a)
|
1007
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
1008
|
+
{
|
1009
|
+
table_.insert_range(f, l);
|
1010
|
+
}
|
1011
|
+
|
1012
|
+
template <class T, class H, class P, class A>
|
1013
|
+
template <class InputIt>
|
1014
|
+
unordered_set<T, H, P, A>::unordered_set(InputIt f, InputIt l, size_type n,
|
1015
|
+
const hasher& hf, const allocator_type& a)
|
1016
|
+
: table_(
|
1017
|
+
boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
|
1018
|
+
{
|
1019
|
+
table_.insert_range(f, l);
|
1020
|
+
}
|
1021
|
+
|
1022
|
+
template <class T, class H, class P, class A>
|
1023
|
+
template <class InputIt>
|
1024
|
+
unordered_set<T, H, P, A>::unordered_set(
|
1025
|
+
InputIt f, InputIt l, size_type n, const allocator_type& a)
|
1026
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
|
1027
|
+
key_equal(), a)
|
1028
|
+
{
|
1029
|
+
table_.insert_range(f, l);
|
1030
|
+
}
|
1031
|
+
|
1032
|
+
template <class T, class H, class P, class A>
|
1033
|
+
unordered_set<T, H, P, A>::~unordered_set() BOOST_NOEXCEPT
|
1034
|
+
{
|
1035
|
+
}
|
1036
|
+
|
1037
|
+
template <class T, class H, class P, class A>
|
1038
|
+
unordered_set<T, H, P, A>::unordered_set(unordered_set const& other)
|
1039
|
+
: table_(other.table_)
|
1040
|
+
{
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
template <class T, class H, class P, class A>
|
1044
|
+
unordered_set<T, H, P, A>::unordered_set(
|
1045
|
+
BOOST_RV_REF(unordered_set) other, allocator_type const& a)
|
1046
|
+
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
1047
|
+
{
|
1048
|
+
}
|
1059
1049
|
|
1060
1050
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1061
1051
|
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1052
|
+
template <class T, class H, class P, class A>
|
1053
|
+
unordered_set<T, H, P, A>::unordered_set(std::initializer_list<value_type> list,
|
1054
|
+
size_type n, const hasher& hf, const key_equal& eql,
|
1055
|
+
const allocator_type& a)
|
1056
|
+
: table_(
|
1057
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1058
|
+
hf, eql, a)
|
1059
|
+
{
|
1060
|
+
table_.insert_range(list.begin(), list.end());
|
1061
|
+
}
|
1062
|
+
|
1063
|
+
template <class T, class H, class P, class A>
|
1064
|
+
unordered_set<T, H, P, A>::unordered_set(std::initializer_list<value_type> list,
|
1065
|
+
size_type n, const hasher& hf, const allocator_type& a)
|
1066
|
+
: table_(
|
1067
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1068
|
+
hf, key_equal(), a)
|
1069
|
+
{
|
1070
|
+
table_.insert_range(list.begin(), list.end());
|
1071
|
+
}
|
1072
|
+
|
1073
|
+
template <class T, class H, class P, class A>
|
1074
|
+
unordered_set<T, H, P, A>::unordered_set(std::initializer_list<value_type> list,
|
1075
|
+
size_type n, const allocator_type& a)
|
1076
|
+
: table_(
|
1077
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1078
|
+
hasher(), key_equal(), a)
|
1079
|
+
{
|
1080
|
+
table_.insert_range(list.begin(), list.end());
|
1081
|
+
}
|
1073
1082
|
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1083
|
+
template <class T, class H, class P, class A>
|
1084
|
+
unordered_set<T, H, P, A>& unordered_set<T, H, P, A>::operator=(
|
1085
|
+
std::initializer_list<value_type> list)
|
1086
|
+
{
|
1087
|
+
table_.clear();
|
1088
|
+
table_.insert_range(list.begin(), list.end());
|
1089
|
+
return *this;
|
1090
|
+
}
|
1082
1091
|
|
1083
1092
|
#endif
|
1084
1093
|
|
1085
|
-
|
1094
|
+
// size and capacity
|
1086
1095
|
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1096
|
+
template <class T, class H, class P, class A>
|
1097
|
+
std::size_t unordered_set<T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
1098
|
+
{
|
1099
|
+
return table_.max_size();
|
1100
|
+
}
|
1092
1101
|
|
1093
|
-
|
1102
|
+
// modifiers
|
1094
1103
|
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1104
|
+
template <class T, class H, class P, class A>
|
1105
|
+
template <class InputIt>
|
1106
|
+
void unordered_set<T, H, P, A>::insert(InputIt first, InputIt last)
|
1107
|
+
{
|
1108
|
+
table_.insert_range(first, last);
|
1109
|
+
}
|
1101
1110
|
|
1102
1111
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
}
|
1112
|
+
template <class T, class H, class P, class A>
|
1113
|
+
void unordered_set<T, H, P, A>::insert(std::initializer_list<value_type> list)
|
1114
|
+
{
|
1115
|
+
table_.insert_range(list.begin(), list.end());
|
1116
|
+
}
|
1109
1117
|
#endif
|
1110
1118
|
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1119
|
+
template <class T, class H, class P, class A>
|
1120
|
+
typename unordered_set<T, H, P, A>::iterator unordered_set<T, H, P, A>::erase(
|
1121
|
+
const_iterator position)
|
1122
|
+
{
|
1123
|
+
return table_.erase(position);
|
1124
|
+
}
|
1117
1125
|
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1126
|
+
template <class T, class H, class P, class A>
|
1127
|
+
typename unordered_set<T, H, P, A>::size_type unordered_set<T, H, P, A>::erase(
|
1128
|
+
const key_type& k)
|
1129
|
+
{
|
1130
|
+
return table_.erase_key(k);
|
1131
|
+
}
|
1124
1132
|
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
}
|
1133
|
+
template <class T, class H, class P, class A>
|
1134
|
+
typename unordered_set<T, H, P, A>::iterator unordered_set<T, H, P, A>::erase(
|
1135
|
+
const_iterator first, const_iterator last)
|
1136
|
+
{
|
1137
|
+
return table_.erase_range(first, last);
|
1138
|
+
}
|
1132
1139
|
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1140
|
+
template <class T, class H, class P, class A>
|
1141
|
+
void unordered_set<T, H, P, A>::clear()
|
1142
|
+
{
|
1143
|
+
table_.clear();
|
1144
|
+
}
|
1138
1145
|
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1146
|
+
template <class T, class H, class P, class A>
|
1147
|
+
void unordered_set<T, H, P, A>::swap(unordered_set& other)
|
1148
|
+
{
|
1149
|
+
table_.swap(other.table_);
|
1150
|
+
}
|
1144
1151
|
|
1145
|
-
|
1152
|
+
// observers
|
1146
1153
|
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1154
|
+
template <class T, class H, class P, class A>
|
1155
|
+
typename unordered_set<T, H, P, A>::hasher
|
1156
|
+
unordered_set<T, H, P, A>::hash_function() const
|
1157
|
+
{
|
1158
|
+
return table_.hash_function();
|
1159
|
+
}
|
1153
1160
|
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1161
|
+
template <class T, class H, class P, class A>
|
1162
|
+
typename unordered_set<T, H, P, A>::key_equal
|
1163
|
+
unordered_set<T, H, P, A>::key_eq() const
|
1164
|
+
{
|
1165
|
+
return table_.key_eq();
|
1166
|
+
}
|
1160
1167
|
|
1161
|
-
|
1168
|
+
template <class T, class H, class P, class A>
|
1169
|
+
template <typename H2, typename P2>
|
1170
|
+
void unordered_set<T, H, P, A>::merge(
|
1171
|
+
boost::unordered_set<T, H2, P2, A>& source)
|
1172
|
+
{
|
1173
|
+
table_.merge_impl(source.table_);
|
1174
|
+
}
|
1162
1175
|
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1176
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1177
|
+
template <class T, class H, class P, class A>
|
1178
|
+
template <typename H2, typename P2>
|
1179
|
+
void unordered_set<T, H, P, A>::merge(
|
1180
|
+
boost::unordered_set<T, H2, P2, A>&& source)
|
1181
|
+
{
|
1182
|
+
table_.merge_impl(source.table_);
|
1183
|
+
}
|
1184
|
+
#endif
|
1169
1185
|
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
{
|
1179
|
-
return table_.generic_find_node(k, hash, eq);
|
1180
|
-
}
|
1186
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
1187
|
+
template <class T, class H, class P, class A>
|
1188
|
+
template <typename H2, typename P2>
|
1189
|
+
void unordered_set<T, H, P, A>::merge(
|
1190
|
+
boost::unordered_multiset<T, H2, P2, A>& source)
|
1191
|
+
{
|
1192
|
+
table_.merge_impl(source.table_);
|
1193
|
+
}
|
1181
1194
|
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1195
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1196
|
+
template <class T, class H, class P, class A>
|
1197
|
+
template <typename H2, typename P2>
|
1198
|
+
void unordered_set<T, H, P, A>::merge(
|
1199
|
+
boost::unordered_multiset<T, H2, P2, A>&& source)
|
1200
|
+
{
|
1201
|
+
table_.merge_impl(source.table_);
|
1202
|
+
}
|
1203
|
+
#endif
|
1204
|
+
#endif
|
1188
1205
|
|
1189
|
-
|
1190
|
-
std::pair<
|
1191
|
-
typename unordered_set<T,H,P,A>::const_iterator,
|
1192
|
-
typename unordered_set<T,H,P,A>::const_iterator>
|
1193
|
-
unordered_set<T,H,P,A>::equal_range(const key_type& k) const
|
1194
|
-
{
|
1195
|
-
return table_.equal_range(k);
|
1196
|
-
}
|
1206
|
+
// lookup
|
1197
1207
|
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1208
|
+
template <class T, class H, class P, class A>
|
1209
|
+
typename unordered_set<T, H, P, A>::const_iterator
|
1210
|
+
unordered_set<T, H, P, A>::find(const key_type& k) const
|
1211
|
+
{
|
1212
|
+
return const_iterator(table_.find_node(k));
|
1213
|
+
}
|
1214
|
+
|
1215
|
+
template <class T, class H, class P, class A>
|
1216
|
+
template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
|
1217
|
+
typename unordered_set<T, H, P, A>::const_iterator
|
1218
|
+
unordered_set<T, H, P, A>::find(CompatibleKey const& k,
|
1219
|
+
CompatibleHash const& hash, CompatiblePredicate const& eq) const
|
1220
|
+
{
|
1221
|
+
return const_iterator(table_.generic_find_node(k, hash, eq));
|
1222
|
+
}
|
1204
1223
|
|
1205
|
-
|
1224
|
+
template <class T, class H, class P, class A>
|
1225
|
+
typename unordered_set<T, H, P, A>::size_type unordered_set<T, H, P, A>::count(
|
1226
|
+
const key_type& k) const
|
1227
|
+
{
|
1228
|
+
return table_.count(k);
|
1229
|
+
}
|
1206
1230
|
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1231
|
+
template <class T, class H, class P, class A>
|
1232
|
+
std::pair<typename unordered_set<T, H, P, A>::const_iterator,
|
1233
|
+
typename unordered_set<T, H, P, A>::const_iterator>
|
1234
|
+
unordered_set<T, H, P, A>::equal_range(const key_type& k) const
|
1235
|
+
{
|
1236
|
+
return table_.equal_range(k);
|
1237
|
+
}
|
1212
1238
|
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1239
|
+
template <class T, class H, class P, class A>
|
1240
|
+
typename unordered_set<T, H, P, A>::size_type
|
1241
|
+
unordered_set<T, H, P, A>::bucket_size(size_type n) const
|
1242
|
+
{
|
1243
|
+
return table_.bucket_size(n);
|
1244
|
+
}
|
1218
1245
|
|
1219
|
-
|
1220
|
-
void unordered_set<T,H,P,A>::rehash(size_type n)
|
1221
|
-
{
|
1222
|
-
table_.rehash(n);
|
1223
|
-
}
|
1246
|
+
// hash policy
|
1224
1247
|
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1248
|
+
template <class T, class H, class P, class A>
|
1249
|
+
float unordered_set<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
|
1250
|
+
{
|
1251
|
+
return table_.load_factor();
|
1252
|
+
}
|
1230
1253
|
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1254
|
+
template <class T, class H, class P, class A>
|
1255
|
+
void unordered_set<T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
|
1256
|
+
{
|
1257
|
+
table_.max_load_factor(m);
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
template <class T, class H, class P, class A>
|
1261
|
+
void unordered_set<T, H, P, A>::rehash(size_type n)
|
1262
|
+
{
|
1263
|
+
table_.rehash(n);
|
1264
|
+
}
|
1265
|
+
|
1266
|
+
template <class T, class H, class P, class A>
|
1267
|
+
void unordered_set<T, H, P, A>::reserve(size_type n)
|
1268
|
+
{
|
1269
|
+
table_.reserve(n);
|
1270
|
+
}
|
1271
|
+
|
1272
|
+
template <class T, class H, class P, class A>
|
1273
|
+
inline bool operator==(
|
1274
|
+
unordered_set<T, H, P, A> const& m1, unordered_set<T, H, P, A> const& m2)
|
1275
|
+
{
|
1236
1276
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1237
|
-
|
1277
|
+
struct dummy
|
1278
|
+
{
|
1279
|
+
unordered_set<T, H, P, A> x;
|
1280
|
+
};
|
1238
1281
|
#endif
|
1239
|
-
|
1240
|
-
|
1282
|
+
return m1.table_.equals(m2.table_);
|
1283
|
+
}
|
1241
1284
|
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
{
|
1285
|
+
template <class T, class H, class P, class A>
|
1286
|
+
inline bool operator!=(
|
1287
|
+
unordered_set<T, H, P, A> const& m1, unordered_set<T, H, P, A> const& m2)
|
1288
|
+
{
|
1247
1289
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1248
|
-
|
1290
|
+
struct dummy
|
1291
|
+
{
|
1292
|
+
unordered_set<T, H, P, A> x;
|
1293
|
+
};
|
1249
1294
|
#endif
|
1250
|
-
|
1251
|
-
|
1295
|
+
return !m1.table_.equals(m2.table_);
|
1296
|
+
}
|
1252
1297
|
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
unordered_set<T,H,P,A> &m2)
|
1257
|
-
{
|
1298
|
+
template <class T, class H, class P, class A>
|
1299
|
+
inline void swap(unordered_set<T, H, P, A>& m1, unordered_set<T, H, P, A>& m2)
|
1300
|
+
{
|
1258
1301
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1259
|
-
|
1302
|
+
struct dummy
|
1303
|
+
{
|
1304
|
+
unordered_set<T, H, P, A> x;
|
1305
|
+
};
|
1260
1306
|
#endif
|
1261
|
-
|
1262
|
-
|
1307
|
+
m1.swap(m2);
|
1308
|
+
}
|
1263
1309
|
|
1264
1310
|
////////////////////////////////////////////////////////////////////////////////
|
1265
1311
|
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
}
|
1312
|
+
template <class T, class H, class P, class A>
|
1313
|
+
unordered_multiset<T, H, P, A>::unordered_multiset()
|
1314
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
1315
|
+
key_equal(), allocator_type())
|
1316
|
+
{
|
1317
|
+
}
|
1273
1318
|
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1319
|
+
template <class T, class H, class P, class A>
|
1320
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(size_type n,
|
1321
|
+
const hasher& hf, const key_equal& eql, const allocator_type& a)
|
1322
|
+
: table_(n, hf, eql, a)
|
1323
|
+
{
|
1324
|
+
}
|
1280
1325
|
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1326
|
+
template <class T, class H, class P, class A>
|
1327
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1328
|
+
size_type n, const allocator_type& a)
|
1329
|
+
: table_(n, hasher(), key_equal(), a)
|
1330
|
+
{
|
1331
|
+
}
|
1287
1332
|
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
table_.insert_range(f, l);
|
1295
|
-
}
|
1333
|
+
template <class T, class H, class P, class A>
|
1334
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1335
|
+
size_type n, const hasher& hf, const allocator_type& a)
|
1336
|
+
: table_(n, hf, key_equal(), a)
|
1337
|
+
{
|
1338
|
+
}
|
1296
1339
|
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
const key_equal &eql)
|
1304
|
-
: table_(boost::unordered::detail::initial_size(f, l, n),
|
1305
|
-
hf, eql, allocator_type())
|
1306
|
-
{
|
1307
|
-
table_.insert_range(f, l);
|
1308
|
-
}
|
1309
|
-
|
1310
|
-
template <class T, class H, class P, class A>
|
1311
|
-
template <class InputIt>
|
1312
|
-
unordered_multiset<T,H,P,A>::unordered_multiset(
|
1313
|
-
InputIt f, InputIt l,
|
1314
|
-
size_type n,
|
1315
|
-
const hasher &hf,
|
1316
|
-
const key_equal &eql,
|
1317
|
-
const allocator_type &a)
|
1318
|
-
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
1319
|
-
{
|
1320
|
-
table_.insert_range(f, l);
|
1321
|
-
}
|
1322
|
-
|
1323
|
-
template <class T, class H, class P, class A>
|
1324
|
-
unordered_multiset<T,H,P,A>::~unordered_multiset() BOOST_NOEXCEPT {}
|
1340
|
+
template <class T, class H, class P, class A>
|
1341
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(allocator_type const& a)
|
1342
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
1343
|
+
key_equal(), a)
|
1344
|
+
{
|
1345
|
+
}
|
1325
1346
|
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1347
|
+
template <class T, class H, class P, class A>
|
1348
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1349
|
+
unordered_multiset const& other, allocator_type const& a)
|
1350
|
+
: table_(other.table_, a)
|
1351
|
+
{
|
1352
|
+
}
|
1332
1353
|
|
1333
|
-
|
1354
|
+
template <class T, class H, class P, class A>
|
1355
|
+
template <class InputIt>
|
1356
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(InputIt f, InputIt l)
|
1357
|
+
: table_(boost::unordered::detail::initial_size(f, l), hasher(),
|
1358
|
+
key_equal(), allocator_type())
|
1359
|
+
{
|
1360
|
+
table_.insert_range(f, l);
|
1361
|
+
}
|
1362
|
+
|
1363
|
+
template <class T, class H, class P, class A>
|
1364
|
+
template <class InputIt>
|
1365
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1366
|
+
InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
|
1367
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
|
1368
|
+
allocator_type())
|
1369
|
+
{
|
1370
|
+
table_.insert_range(f, l);
|
1371
|
+
}
|
1372
|
+
|
1373
|
+
template <class T, class H, class P, class A>
|
1374
|
+
template <class InputIt>
|
1375
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(InputIt f, InputIt l,
|
1376
|
+
size_type n, const hasher& hf, const key_equal& eql,
|
1377
|
+
const allocator_type& a)
|
1378
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
1379
|
+
{
|
1380
|
+
table_.insert_range(f, l);
|
1381
|
+
}
|
1382
|
+
|
1383
|
+
template <class T, class H, class P, class A>
|
1384
|
+
template <class InputIt>
|
1385
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(InputIt f, InputIt l,
|
1386
|
+
size_type n, const hasher& hf, const allocator_type& a)
|
1387
|
+
: table_(
|
1388
|
+
boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
|
1389
|
+
{
|
1390
|
+
table_.insert_range(f, l);
|
1391
|
+
}
|
1392
|
+
|
1393
|
+
template <class T, class H, class P, class A>
|
1394
|
+
template <class InputIt>
|
1395
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1396
|
+
InputIt f, InputIt l, size_type n, const allocator_type& a)
|
1397
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
|
1398
|
+
key_equal(), a)
|
1399
|
+
{
|
1400
|
+
table_.insert_range(f, l);
|
1401
|
+
}
|
1334
1402
|
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
{
|
1340
|
-
}
|
1403
|
+
template <class T, class H, class P, class A>
|
1404
|
+
unordered_multiset<T, H, P, A>::~unordered_multiset() BOOST_NOEXCEPT
|
1405
|
+
{
|
1406
|
+
}
|
1341
1407
|
|
1342
|
-
|
1408
|
+
template <class T, class H, class P, class A>
|
1409
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1410
|
+
unordered_multiset const& other)
|
1411
|
+
: table_(other.table_)
|
1412
|
+
{
|
1413
|
+
}
|
1414
|
+
|
1415
|
+
template <class T, class H, class P, class A>
|
1416
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1417
|
+
BOOST_RV_REF(unordered_multiset) other, allocator_type const& a)
|
1418
|
+
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
1419
|
+
{
|
1420
|
+
}
|
1343
1421
|
|
1344
1422
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1345
1423
|
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1424
|
+
template <class T, class H, class P, class A>
|
1425
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1426
|
+
std::initializer_list<value_type> list, size_type n, const hasher& hf,
|
1427
|
+
const key_equal& eql, const allocator_type& a)
|
1428
|
+
: table_(
|
1429
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1430
|
+
hf, eql, a)
|
1431
|
+
{
|
1432
|
+
table_.insert_range(list.begin(), list.end());
|
1433
|
+
}
|
1434
|
+
|
1435
|
+
template <class T, class H, class P, class A>
|
1436
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1437
|
+
std::initializer_list<value_type> list, size_type n, const hasher& hf,
|
1438
|
+
const allocator_type& a)
|
1439
|
+
: table_(
|
1440
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1441
|
+
hf, key_equal(), a)
|
1442
|
+
{
|
1443
|
+
table_.insert_range(list.begin(), list.end());
|
1444
|
+
}
|
1445
|
+
|
1446
|
+
template <class T, class H, class P, class A>
|
1447
|
+
unordered_multiset<T, H, P, A>::unordered_multiset(
|
1448
|
+
std::initializer_list<value_type> list, size_type n,
|
1449
|
+
const allocator_type& a)
|
1450
|
+
: table_(
|
1451
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1452
|
+
hasher(), key_equal(), a)
|
1453
|
+
{
|
1454
|
+
table_.insert_range(list.begin(), list.end());
|
1455
|
+
}
|
1357
1456
|
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1457
|
+
template <class T, class H, class P, class A>
|
1458
|
+
unordered_multiset<T, H, P, A>& unordered_multiset<T, H, P, A>::operator=(
|
1459
|
+
std::initializer_list<value_type> list)
|
1460
|
+
{
|
1461
|
+
table_.clear();
|
1462
|
+
table_.insert_range(list.begin(), list.end());
|
1463
|
+
return *this;
|
1464
|
+
}
|
1366
1465
|
|
1367
1466
|
#endif
|
1368
1467
|
|
1369
|
-
|
1468
|
+
// size and capacity
|
1370
1469
|
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1470
|
+
template <class T, class H, class P, class A>
|
1471
|
+
std::size_t unordered_multiset<T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
1472
|
+
{
|
1473
|
+
return table_.max_size();
|
1474
|
+
}
|
1376
1475
|
|
1377
|
-
|
1476
|
+
// modifiers
|
1378
1477
|
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1478
|
+
template <class T, class H, class P, class A>
|
1479
|
+
template <class InputIt>
|
1480
|
+
void unordered_multiset<T, H, P, A>::insert(InputIt first, InputIt last)
|
1481
|
+
{
|
1482
|
+
table_.insert_range(first, last);
|
1483
|
+
}
|
1385
1484
|
|
1386
1485
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1486
|
+
template <class T, class H, class P, class A>
|
1487
|
+
void unordered_multiset<T, H, P, A>::insert(
|
1488
|
+
std::initializer_list<value_type> list)
|
1489
|
+
{
|
1490
|
+
table_.insert_range(list.begin(), list.end());
|
1491
|
+
}
|
1393
1492
|
#endif
|
1394
1493
|
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1494
|
+
template <class T, class H, class P, class A>
|
1495
|
+
typename unordered_multiset<T, H, P, A>::iterator
|
1496
|
+
unordered_multiset<T, H, P, A>::erase(const_iterator position)
|
1497
|
+
{
|
1498
|
+
return table_.erase(position);
|
1499
|
+
}
|
1401
1500
|
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1501
|
+
template <class T, class H, class P, class A>
|
1502
|
+
typename unordered_multiset<T, H, P, A>::size_type
|
1503
|
+
unordered_multiset<T, H, P, A>::erase(const key_type& k)
|
1504
|
+
{
|
1505
|
+
return table_.erase_key(k);
|
1506
|
+
}
|
1507
|
+
|
1508
|
+
template <class T, class H, class P, class A>
|
1509
|
+
typename unordered_multiset<T, H, P, A>::iterator
|
1510
|
+
unordered_multiset<T, H, P, A>::erase(const_iterator first, const_iterator last)
|
1511
|
+
{
|
1512
|
+
return table_.erase_range(first, last);
|
1513
|
+
}
|
1514
|
+
|
1515
|
+
template <class T, class H, class P, class A>
|
1516
|
+
void unordered_multiset<T, H, P, A>::clear()
|
1517
|
+
{
|
1518
|
+
table_.clear();
|
1519
|
+
}
|
1520
|
+
|
1521
|
+
template <class T, class H, class P, class A>
|
1522
|
+
void unordered_multiset<T, H, P, A>::swap(unordered_multiset& other)
|
1523
|
+
{
|
1524
|
+
table_.swap(other.table_);
|
1525
|
+
}
|
1526
|
+
|
1527
|
+
// observers
|
1528
|
+
|
1529
|
+
template <class T, class H, class P, class A>
|
1530
|
+
typename unordered_multiset<T, H, P, A>::hasher
|
1531
|
+
unordered_multiset<T, H, P, A>::hash_function() const
|
1532
|
+
{
|
1533
|
+
return table_.hash_function();
|
1534
|
+
}
|
1535
|
+
|
1536
|
+
template <class T, class H, class P, class A>
|
1537
|
+
typename unordered_multiset<T, H, P, A>::key_equal
|
1538
|
+
unordered_multiset<T, H, P, A>::key_eq() const
|
1539
|
+
{
|
1540
|
+
return table_.key_eq();
|
1541
|
+
}
|
1542
|
+
|
1543
|
+
template <class T, class H, class P, class A>
|
1544
|
+
template <typename H2, typename P2>
|
1545
|
+
void unordered_multiset<T, H, P, A>::merge(
|
1546
|
+
boost::unordered_multiset<T, H2, P2, A>& source)
|
1547
|
+
{
|
1548
|
+
while (!source.empty()) {
|
1549
|
+
insert(source.extract(source.begin()));
|
1407
1550
|
}
|
1551
|
+
}
|
1408
1552
|
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1553
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1554
|
+
template <class T, class H, class P, class A>
|
1555
|
+
template <typename H2, typename P2>
|
1556
|
+
void unordered_multiset<T, H, P, A>::merge(
|
1557
|
+
boost::unordered_multiset<T, H2, P2, A>&& source)
|
1558
|
+
{
|
1559
|
+
while (!source.empty()) {
|
1560
|
+
insert(source.extract(source.begin()));
|
1415
1561
|
}
|
1562
|
+
}
|
1563
|
+
#endif
|
1416
1564
|
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1565
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
1566
|
+
template <class T, class H, class P, class A>
|
1567
|
+
template <typename H2, typename P2>
|
1568
|
+
void unordered_multiset<T, H, P, A>::merge(
|
1569
|
+
boost::unordered_set<T, H2, P2, A>& source)
|
1570
|
+
{
|
1571
|
+
while (!source.empty()) {
|
1572
|
+
insert(source.extract(source.begin()));
|
1421
1573
|
}
|
1574
|
+
}
|
1422
1575
|
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1576
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1577
|
+
template <class T, class H, class P, class A>
|
1578
|
+
template <typename H2, typename P2>
|
1579
|
+
void unordered_multiset<T, H, P, A>::merge(
|
1580
|
+
boost::unordered_set<T, H2, P2, A>&& source)
|
1581
|
+
{
|
1582
|
+
while (!source.empty()) {
|
1583
|
+
insert(source.extract(source.begin()));
|
1427
1584
|
}
|
1585
|
+
}
|
1586
|
+
#endif
|
1587
|
+
#endif
|
1428
1588
|
|
1429
|
-
|
1589
|
+
// lookup
|
1590
|
+
|
1591
|
+
template <class T, class H, class P, class A>
|
1592
|
+
typename unordered_multiset<T, H, P, A>::const_iterator
|
1593
|
+
unordered_multiset<T, H, P, A>::find(const key_type& k) const
|
1594
|
+
{
|
1595
|
+
return const_iterator(table_.find_node(k));
|
1596
|
+
}
|
1597
|
+
|
1598
|
+
template <class T, class H, class P, class A>
|
1599
|
+
template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
|
1600
|
+
typename unordered_multiset<T, H, P, A>::const_iterator
|
1601
|
+
unordered_multiset<T, H, P, A>::find(CompatibleKey const& k,
|
1602
|
+
CompatibleHash const& hash, CompatiblePredicate const& eq) const
|
1603
|
+
{
|
1604
|
+
return const_iterator(table_.generic_find_node(k, hash, eq));
|
1605
|
+
}
|
1606
|
+
|
1607
|
+
template <class T, class H, class P, class A>
|
1608
|
+
typename unordered_multiset<T, H, P, A>::size_type
|
1609
|
+
unordered_multiset<T, H, P, A>::count(const key_type& k) const
|
1610
|
+
{
|
1611
|
+
return table_.count(k);
|
1612
|
+
}
|
1613
|
+
|
1614
|
+
template <class T, class H, class P, class A>
|
1615
|
+
std::pair<typename unordered_multiset<T, H, P, A>::const_iterator,
|
1616
|
+
typename unordered_multiset<T, H, P, A>::const_iterator>
|
1617
|
+
unordered_multiset<T, H, P, A>::equal_range(const key_type& k) const
|
1618
|
+
{
|
1619
|
+
return table_.equal_range(k);
|
1620
|
+
}
|
1621
|
+
|
1622
|
+
template <class T, class H, class P, class A>
|
1623
|
+
typename unordered_multiset<T, H, P, A>::size_type
|
1624
|
+
unordered_multiset<T, H, P, A>::bucket_size(size_type n) const
|
1625
|
+
{
|
1626
|
+
return table_.bucket_size(n);
|
1627
|
+
}
|
1628
|
+
|
1629
|
+
// hash policy
|
1630
|
+
|
1631
|
+
template <class T, class H, class P, class A>
|
1632
|
+
float unordered_multiset<T, H, P, A>::load_factor() const BOOST_NOEXCEPT
|
1633
|
+
{
|
1634
|
+
return table_.load_factor();
|
1635
|
+
}
|
1636
|
+
|
1637
|
+
template <class T, class H, class P, class A>
|
1638
|
+
void unordered_multiset<T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
|
1639
|
+
{
|
1640
|
+
table_.max_load_factor(m);
|
1641
|
+
}
|
1642
|
+
|
1643
|
+
template <class T, class H, class P, class A>
|
1644
|
+
void unordered_multiset<T, H, P, A>::rehash(size_type n)
|
1645
|
+
{
|
1646
|
+
table_.rehash(n);
|
1647
|
+
}
|
1648
|
+
|
1649
|
+
template <class T, class H, class P, class A>
|
1650
|
+
void unordered_multiset<T, H, P, A>::reserve(size_type n)
|
1651
|
+
{
|
1652
|
+
table_.reserve(n);
|
1653
|
+
}
|
1654
|
+
|
1655
|
+
template <class T, class H, class P, class A>
|
1656
|
+
inline bool operator==(unordered_multiset<T, H, P, A> const& m1,
|
1657
|
+
unordered_multiset<T, H, P, A> const& m2)
|
1658
|
+
{
|
1659
|
+
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1660
|
+
struct dummy
|
1661
|
+
{
|
1662
|
+
unordered_multiset<T, H, P, A> x;
|
1663
|
+
};
|
1664
|
+
#endif
|
1665
|
+
return m1.table_.equals(m2.table_);
|
1666
|
+
}
|
1430
1667
|
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1668
|
+
template <class T, class H, class P, class A>
|
1669
|
+
inline bool operator!=(unordered_multiset<T, H, P, A> const& m1,
|
1670
|
+
unordered_multiset<T, H, P, A> const& m2)
|
1671
|
+
{
|
1672
|
+
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1673
|
+
struct dummy
|
1434
1674
|
{
|
1435
|
-
|
1436
|
-
}
|
1675
|
+
unordered_multiset<T, H, P, A> x;
|
1676
|
+
};
|
1677
|
+
#endif
|
1678
|
+
return !m1.table_.equals(m2.table_);
|
1679
|
+
}
|
1437
1680
|
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1681
|
+
template <class T, class H, class P, class A>
|
1682
|
+
inline void swap(
|
1683
|
+
unordered_multiset<T, H, P, A>& m1, unordered_multiset<T, H, P, A>& m2)
|
1684
|
+
{
|
1685
|
+
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1686
|
+
struct dummy
|
1441
1687
|
{
|
1442
|
-
|
1443
|
-
}
|
1688
|
+
unordered_multiset<T, H, P, A> x;
|
1689
|
+
};
|
1690
|
+
#endif
|
1691
|
+
m1.swap(m2);
|
1692
|
+
}
|
1444
1693
|
|
1445
|
-
|
1694
|
+
template <typename N, typename T, typename A> class node_handle_set
|
1695
|
+
{
|
1696
|
+
BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_set)
|
1697
|
+
|
1698
|
+
template <typename Types>
|
1699
|
+
friend struct ::boost::unordered::detail::table_impl;
|
1700
|
+
template <typename Types>
|
1701
|
+
friend struct ::boost::unordered::detail::grouped_table_impl;
|
1446
1702
|
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1703
|
+
typedef typename boost::unordered::detail::rebind_wrap<A, T>::type
|
1704
|
+
value_allocator;
|
1705
|
+
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
1706
|
+
value_allocator_traits;
|
1707
|
+
typedef N node;
|
1708
|
+
typedef typename boost::unordered::detail::rebind_wrap<A, node>::type
|
1709
|
+
node_allocator;
|
1710
|
+
typedef boost::unordered::detail::allocator_traits<node_allocator>
|
1711
|
+
node_allocator_traits;
|
1712
|
+
typedef typename node_allocator_traits::pointer node_pointer;
|
1713
|
+
|
1714
|
+
public:
|
1715
|
+
typedef T value_type;
|
1716
|
+
typedef A allocator_type;
|
1717
|
+
|
1718
|
+
private:
|
1719
|
+
node_pointer ptr_;
|
1720
|
+
bool has_alloc_;
|
1721
|
+
boost::unordered::detail::value_base<value_allocator> alloc_;
|
1722
|
+
|
1723
|
+
public:
|
1724
|
+
BOOST_CONSTEXPR node_handle_set() BOOST_NOEXCEPT : ptr_(), has_alloc_(false)
|
1450
1725
|
{
|
1451
|
-
return table_.find_node(k);
|
1452
1726
|
}
|
1453
1727
|
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
typename unordered_multiset<T,H,P,A>::const_iterator
|
1458
|
-
unordered_multiset<T,H,P,A>::find(
|
1459
|
-
CompatibleKey const& k,
|
1460
|
-
CompatibleHash const& hash,
|
1461
|
-
CompatiblePredicate const& eq) const
|
1728
|
+
/*BOOST_CONSTEXPR */ node_handle_set(
|
1729
|
+
node_pointer ptr, allocator_type const& a)
|
1730
|
+
: ptr_(ptr), has_alloc_(false)
|
1462
1731
|
{
|
1463
|
-
|
1732
|
+
if (ptr_) {
|
1733
|
+
new ((void*)&alloc_) value_allocator(a);
|
1734
|
+
has_alloc_ = true;
|
1735
|
+
}
|
1464
1736
|
}
|
1465
1737
|
|
1466
|
-
|
1467
|
-
typename unordered_multiset<T,H,P,A>::size_type
|
1468
|
-
unordered_multiset<T,H,P,A>::count(const key_type& k) const
|
1738
|
+
~node_handle_set()
|
1469
1739
|
{
|
1470
|
-
|
1740
|
+
if (has_alloc_ && ptr_) {
|
1741
|
+
node_allocator node_alloc(alloc_.value());
|
1742
|
+
boost::unordered::detail::node_tmp<node_allocator> tmp(
|
1743
|
+
ptr_, node_alloc);
|
1744
|
+
}
|
1745
|
+
if (has_alloc_) {
|
1746
|
+
alloc_.value_ptr()->~value_allocator();
|
1747
|
+
}
|
1471
1748
|
}
|
1472
1749
|
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
typename unordered_multiset<T,H,P,A>::const_iterator>
|
1477
|
-
unordered_multiset<T,H,P,A>::equal_range(const key_type& k) const
|
1750
|
+
node_handle_set(BOOST_RV_REF(node_handle_set) n) BOOST_NOEXCEPT
|
1751
|
+
: ptr_(n.ptr_),
|
1752
|
+
has_alloc_(false)
|
1478
1753
|
{
|
1479
|
-
|
1754
|
+
if (n.has_alloc_) {
|
1755
|
+
new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
|
1756
|
+
has_alloc_ = true;
|
1757
|
+
n.ptr_ = node_pointer();
|
1758
|
+
n.alloc_.value_ptr()->~value_allocator();
|
1759
|
+
n.has_alloc_ = false;
|
1760
|
+
}
|
1480
1761
|
}
|
1481
1762
|
|
1482
|
-
|
1483
|
-
typename unordered_multiset<T,H,P,A>::size_type
|
1484
|
-
unordered_multiset<T,H,P,A>::bucket_size(size_type n) const
|
1763
|
+
node_handle_set& operator=(BOOST_RV_REF(node_handle_set) n)
|
1485
1764
|
{
|
1486
|
-
|
1487
|
-
|
1765
|
+
BOOST_ASSERT(!has_alloc_ ||
|
1766
|
+
value_allocator_traits::
|
1767
|
+
propagate_on_container_move_assignment::value ||
|
1768
|
+
(n.has_alloc_ && alloc_.value() == n.alloc_.value()));
|
1488
1769
|
|
1489
|
-
|
1770
|
+
if (ptr_) {
|
1771
|
+
node_allocator node_alloc(alloc_.value());
|
1772
|
+
boost::unordered::detail::node_tmp<node_allocator> tmp(
|
1773
|
+
ptr_, node_alloc);
|
1774
|
+
ptr_ = node_pointer();
|
1775
|
+
}
|
1490
1776
|
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
}
|
1777
|
+
if (has_alloc_) {
|
1778
|
+
alloc_.value_ptr()->~value_allocator();
|
1779
|
+
has_alloc_ = false;
|
1780
|
+
}
|
1496
1781
|
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1782
|
+
if (!has_alloc_ && n.has_alloc_) {
|
1783
|
+
move_allocator(n);
|
1784
|
+
}
|
1785
|
+
|
1786
|
+
ptr_ = n.ptr_;
|
1787
|
+
n.ptr_ = node_pointer();
|
1788
|
+
|
1789
|
+
return *this;
|
1501
1790
|
}
|
1502
1791
|
|
1503
|
-
|
1504
|
-
|
1792
|
+
value_type& value() const { return ptr_->value(); }
|
1793
|
+
|
1794
|
+
allocator_type get_allocator() const { return alloc_.value(); }
|
1795
|
+
|
1796
|
+
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
|
1797
|
+
|
1798
|
+
bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
1799
|
+
|
1800
|
+
bool empty() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
1801
|
+
|
1802
|
+
void swap(node_handle_set& n) BOOST_NOEXCEPT_IF(
|
1803
|
+
value_allocator_traits::propagate_on_container_swap::value
|
1804
|
+
/* || value_allocator_traits::is_always_equal::value */)
|
1505
1805
|
{
|
1506
|
-
|
1806
|
+
if (!has_alloc_) {
|
1807
|
+
if (n.has_alloc_) {
|
1808
|
+
move_allocator(n);
|
1809
|
+
}
|
1810
|
+
} else if (!n.has_alloc_) {
|
1811
|
+
n.move_allocator(*this);
|
1812
|
+
} else {
|
1813
|
+
swap_impl(n, boost::unordered::detail::integral_constant<bool,
|
1814
|
+
value_allocator_traits::
|
1815
|
+
propagate_on_container_swap::value>());
|
1816
|
+
}
|
1817
|
+
boost::swap(ptr_, n.ptr_);
|
1507
1818
|
}
|
1508
1819
|
|
1509
|
-
|
1510
|
-
void
|
1820
|
+
private:
|
1821
|
+
void move_allocator(node_handle_set& n)
|
1511
1822
|
{
|
1512
|
-
|
1823
|
+
new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
|
1824
|
+
n.alloc_.value_ptr()->~value_allocator();
|
1825
|
+
has_alloc_ = true;
|
1826
|
+
n.has_alloc_ = false;
|
1513
1827
|
}
|
1514
1828
|
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
unordered_multiset<T,H,P,A> const& m2)
|
1829
|
+
void swap_impl(node_handle_set&, boost::unordered::detail::false_type) {}
|
1830
|
+
|
1831
|
+
void swap_impl(node_handle_set& n, boost::unordered::detail::true_type)
|
1519
1832
|
{
|
1520
|
-
|
1521
|
-
struct dummy { unordered_multiset<T,H,P,A> x; };
|
1522
|
-
#endif
|
1523
|
-
return m1.table_.equals(m2.table_);
|
1833
|
+
boost::swap(alloc_, n.alloc_);
|
1524
1834
|
}
|
1835
|
+
};
|
1836
|
+
|
1837
|
+
template <typename N, typename T, typename A>
|
1838
|
+
void swap(node_handle_set<N, T, A>& x, node_handle_set<N, T, A>& y)
|
1839
|
+
BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(x.swap(y)))
|
1840
|
+
{
|
1841
|
+
x.swap(y);
|
1842
|
+
}
|
1843
|
+
|
1844
|
+
template <typename N, typename T, typename A> struct insert_return_type_set
|
1845
|
+
{
|
1846
|
+
private:
|
1847
|
+
BOOST_MOVABLE_BUT_NOT_COPYABLE(insert_return_type_set)
|
1848
|
+
|
1849
|
+
typedef typename boost::unordered::detail::rebind_wrap<A, T>::type
|
1850
|
+
value_allocator;
|
1851
|
+
typedef N node_;
|
1525
1852
|
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1853
|
+
public:
|
1854
|
+
bool inserted;
|
1855
|
+
boost::unordered::iterator_detail::c_iterator<node_> position;
|
1856
|
+
boost::unordered::node_handle_set<N, T, A> node;
|
1857
|
+
|
1858
|
+
insert_return_type_set() : inserted(false), position(), node() {}
|
1859
|
+
|
1860
|
+
insert_return_type_set(BOOST_RV_REF(insert_return_type_set)
|
1861
|
+
x) BOOST_NOEXCEPT : inserted(x.inserted),
|
1862
|
+
position(x.position),
|
1863
|
+
node(boost::move(x.node))
|
1530
1864
|
{
|
1531
|
-
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1532
|
-
struct dummy { unordered_multiset<T,H,P,A> x; };
|
1533
|
-
#endif
|
1534
|
-
return !m1.table_.equals(m2.table_);
|
1535
1865
|
}
|
1536
1866
|
|
1537
|
-
|
1538
|
-
inline void swap(
|
1539
|
-
unordered_multiset<T,H,P,A> &m1,
|
1540
|
-
unordered_multiset<T,H,P,A> &m2)
|
1867
|
+
insert_return_type_set& operator=(BOOST_RV_REF(insert_return_type_set) x)
|
1541
1868
|
{
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1869
|
+
inserted = x.inserted;
|
1870
|
+
position = x.position;
|
1871
|
+
node = boost::move(x.node);
|
1872
|
+
return *this;
|
1546
1873
|
}
|
1874
|
+
};
|
1875
|
+
|
1876
|
+
template <typename N, typename T, typename A>
|
1877
|
+
void swap(
|
1878
|
+
insert_return_type_set<N, T, A>& x, insert_return_type_set<N, T, A>& y)
|
1879
|
+
{
|
1880
|
+
boost::swap(x.node, y.node);
|
1881
|
+
boost::swap(x.inserted, y.inserted);
|
1882
|
+
boost::swap(x.position, y.position);
|
1883
|
+
}
|
1547
1884
|
} // namespace unordered
|
1548
1885
|
} // namespace boost
|
1549
1886
|
|