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
@@ -0,0 +1,107 @@
|
|
1
|
+
|
2
|
+
// Copyright (C) 2005-2016 Daniel James
|
3
|
+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
4
|
+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
5
|
+
|
6
|
+
#include <boost/unordered/detail/implementation.hpp>
|
7
|
+
#include <boost/unordered/unordered_map_fwd.hpp>
|
8
|
+
|
9
|
+
namespace boost {
|
10
|
+
namespace unordered {
|
11
|
+
namespace detail {
|
12
|
+
template <typename A, typename K, typename M, typename H, typename P> struct map
|
13
|
+
{
|
14
|
+
typedef boost::unordered::detail::map<A, K, M, H, P> types;
|
15
|
+
|
16
|
+
typedef std::pair<K const, M> value_type;
|
17
|
+
typedef H hasher;
|
18
|
+
typedef P key_equal;
|
19
|
+
typedef K const const_key_type;
|
20
|
+
|
21
|
+
typedef typename ::boost::unordered::detail::rebind_wrap<A,
|
22
|
+
value_type>::type value_allocator;
|
23
|
+
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
24
|
+
value_allocator_traits;
|
25
|
+
|
26
|
+
typedef boost::unordered::detail::pick_node<A, value_type> pick;
|
27
|
+
typedef typename pick::node node;
|
28
|
+
typedef typename pick::bucket bucket;
|
29
|
+
typedef typename pick::link_pointer link_pointer;
|
30
|
+
typedef typename pick::node_algo node_algo;
|
31
|
+
|
32
|
+
typedef boost::unordered::detail::table_impl<types> table;
|
33
|
+
typedef boost::unordered::detail::map_extractor<value_type> extractor;
|
34
|
+
|
35
|
+
typedef typename boost::unordered::detail::pick_policy<K>::type policy;
|
36
|
+
|
37
|
+
typedef boost::unordered::iterator_detail::iterator<node> iterator;
|
38
|
+
typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
|
39
|
+
typedef boost::unordered::iterator_detail::l_iterator<node, policy>
|
40
|
+
l_iterator;
|
41
|
+
typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
|
42
|
+
cl_iterator;
|
43
|
+
|
44
|
+
typedef boost::unordered::node_handle_map<node, K, M, A> node_type;
|
45
|
+
typedef boost::unordered::insert_return_type_map<node, K, M, A>
|
46
|
+
insert_return_type;
|
47
|
+
};
|
48
|
+
|
49
|
+
template <typename A, typename K, typename M, typename H, typename P>
|
50
|
+
struct multimap
|
51
|
+
{
|
52
|
+
typedef boost::unordered::detail::multimap<A, K, M, H, P> types;
|
53
|
+
|
54
|
+
typedef std::pair<K const, M> value_type;
|
55
|
+
typedef H hasher;
|
56
|
+
typedef P key_equal;
|
57
|
+
typedef K const const_key_type;
|
58
|
+
|
59
|
+
typedef typename ::boost::unordered::detail::rebind_wrap<A,
|
60
|
+
value_type>::type value_allocator;
|
61
|
+
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
62
|
+
value_allocator_traits;
|
63
|
+
|
64
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
65
|
+
typedef boost::unordered::detail::pick_node<A, value_type> pick;
|
66
|
+
#else
|
67
|
+
typedef boost::unordered::detail::pick_grouped_node<A, value_type> pick;
|
68
|
+
#endif
|
69
|
+
typedef typename pick::node node;
|
70
|
+
typedef typename pick::bucket bucket;
|
71
|
+
typedef typename pick::link_pointer link_pointer;
|
72
|
+
typedef typename pick::node_algo node_algo;
|
73
|
+
|
74
|
+
typedef boost::unordered::detail::grouped_table_impl<types> table;
|
75
|
+
typedef boost::unordered::detail::map_extractor<value_type> extractor;
|
76
|
+
|
77
|
+
typedef typename boost::unordered::detail::pick_policy<K>::type policy;
|
78
|
+
|
79
|
+
typedef boost::unordered::iterator_detail::iterator<node> iterator;
|
80
|
+
typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
|
81
|
+
typedef boost::unordered::iterator_detail::l_iterator<node, policy>
|
82
|
+
l_iterator;
|
83
|
+
typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
|
84
|
+
cl_iterator;
|
85
|
+
|
86
|
+
typedef boost::unordered::node_handle_map<node, K, M, A> node_type;
|
87
|
+
};
|
88
|
+
|
89
|
+
template <typename K, typename M, typename H, typename P, typename A>
|
90
|
+
class instantiate_map
|
91
|
+
{
|
92
|
+
typedef boost::unordered_map<K, M, H, P, A> container;
|
93
|
+
container x;
|
94
|
+
typename container::node_type node_type;
|
95
|
+
typename container::insert_return_type insert_return_type;
|
96
|
+
};
|
97
|
+
|
98
|
+
template <typename K, typename M, typename H, typename P, typename A>
|
99
|
+
class instantiate_multimap
|
100
|
+
{
|
101
|
+
typedef boost::unordered_multimap<K, M, H, P, A> container;
|
102
|
+
container x;
|
103
|
+
typename container::node_type node_type;
|
104
|
+
};
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
|
2
|
+
// Copyright (C) 2005-2016 Daniel James
|
3
|
+
// Distributed under the Boost Software License, Version 1.0. (See accompanying
|
4
|
+
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
5
|
+
|
6
|
+
#include <boost/unordered/detail/implementation.hpp>
|
7
|
+
#include <boost/unordered/unordered_set_fwd.hpp>
|
8
|
+
|
9
|
+
namespace boost {
|
10
|
+
namespace unordered {
|
11
|
+
namespace detail {
|
12
|
+
template <typename A, typename T, typename H, typename P> struct set
|
13
|
+
{
|
14
|
+
typedef boost::unordered::detail::set<A, T, H, P> types;
|
15
|
+
|
16
|
+
typedef T value_type;
|
17
|
+
typedef H hasher;
|
18
|
+
typedef P key_equal;
|
19
|
+
typedef T const const_key_type;
|
20
|
+
|
21
|
+
typedef typename ::boost::unordered::detail::rebind_wrap<A,
|
22
|
+
value_type>::type value_allocator;
|
23
|
+
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
24
|
+
value_allocator_traits;
|
25
|
+
|
26
|
+
typedef boost::unordered::detail::pick_node<A, value_type> pick;
|
27
|
+
typedef typename pick::node node;
|
28
|
+
typedef typename pick::bucket bucket;
|
29
|
+
typedef typename pick::link_pointer link_pointer;
|
30
|
+
typedef typename pick::node_algo node_algo;
|
31
|
+
|
32
|
+
typedef boost::unordered::detail::table_impl<types> table;
|
33
|
+
typedef boost::unordered::detail::set_extractor<value_type> extractor;
|
34
|
+
|
35
|
+
typedef typename boost::unordered::detail::pick_policy<T>::type policy;
|
36
|
+
|
37
|
+
typedef boost::unordered::iterator_detail::c_iterator<node> iterator;
|
38
|
+
typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
|
39
|
+
typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
|
40
|
+
l_iterator;
|
41
|
+
typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
|
42
|
+
cl_iterator;
|
43
|
+
|
44
|
+
typedef boost::unordered::node_handle_set<node, T, A> node_type;
|
45
|
+
typedef boost::unordered::insert_return_type_set<node, T, A>
|
46
|
+
insert_return_type;
|
47
|
+
};
|
48
|
+
|
49
|
+
template <typename A, typename T, typename H, typename P> struct multiset
|
50
|
+
{
|
51
|
+
typedef boost::unordered::detail::multiset<A, T, H, P> types;
|
52
|
+
|
53
|
+
typedef T value_type;
|
54
|
+
typedef H hasher;
|
55
|
+
typedef P key_equal;
|
56
|
+
typedef T const const_key_type;
|
57
|
+
|
58
|
+
typedef typename ::boost::unordered::detail::rebind_wrap<A,
|
59
|
+
value_type>::type value_allocator;
|
60
|
+
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
61
|
+
value_allocator_traits;
|
62
|
+
|
63
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
64
|
+
typedef boost::unordered::detail::pick_node<A, value_type> pick;
|
65
|
+
#else
|
66
|
+
typedef boost::unordered::detail::pick_grouped_node<A, value_type> pick;
|
67
|
+
#endif
|
68
|
+
typedef typename pick::node node;
|
69
|
+
typedef typename pick::bucket bucket;
|
70
|
+
typedef typename pick::link_pointer link_pointer;
|
71
|
+
typedef typename pick::node_algo node_algo;
|
72
|
+
|
73
|
+
typedef boost::unordered::detail::grouped_table_impl<types> table;
|
74
|
+
typedef boost::unordered::detail::set_extractor<value_type> extractor;
|
75
|
+
|
76
|
+
typedef typename boost::unordered::detail::pick_policy<T>::type policy;
|
77
|
+
|
78
|
+
typedef boost::unordered::iterator_detail::c_iterator<node> iterator;
|
79
|
+
typedef boost::unordered::iterator_detail::c_iterator<node> c_iterator;
|
80
|
+
typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
|
81
|
+
l_iterator;
|
82
|
+
typedef boost::unordered::iterator_detail::cl_iterator<node, policy>
|
83
|
+
cl_iterator;
|
84
|
+
|
85
|
+
typedef boost::unordered::node_handle_set<node, T, A> node_type;
|
86
|
+
};
|
87
|
+
|
88
|
+
template <typename T, typename H, typename P, typename A> class instantiate_set
|
89
|
+
{
|
90
|
+
typedef boost::unordered_set<T, H, P, A> container;
|
91
|
+
container x;
|
92
|
+
typename container::node_type node_type;
|
93
|
+
typename container::insert_return_type insert_return_type;
|
94
|
+
};
|
95
|
+
|
96
|
+
template <typename T, typename H, typename P, typename A>
|
97
|
+
class instantiate_multiset
|
98
|
+
{
|
99
|
+
typedef boost::unordered_multiset<T, H, P, A> container;
|
100
|
+
container x;
|
101
|
+
typename container::node_type node_type;
|
102
|
+
};
|
103
|
+
}
|
104
|
+
}
|
105
|
+
}
|
@@ -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/map.hpp>
|
23
21
|
|
24
22
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
25
23
|
#include <initializer_list>
|
@@ -28,1625 +26,2186 @@
|
|
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 K, class T, class H, class P, class A> class unordered_map
|
38
38
|
{
|
39
|
-
namespace unordered
|
40
|
-
{
|
41
|
-
template <class K, class T, class H, class P, class A>
|
42
|
-
class unordered_map
|
43
|
-
{
|
44
39
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
45
|
-
|
46
|
-
#endif
|
40
|
+
BOOST_COPYABLE_AND_MOVABLE(unordered_map)
|
41
|
+
#endif
|
42
|
+
template <typename, typename, typename, typename, typename>
|
43
|
+
friend class unordered_multimap;
|
47
44
|
|
48
|
-
|
45
|
+
public:
|
46
|
+
typedef K key_type;
|
47
|
+
typedef std::pair<const K, T> value_type;
|
48
|
+
typedef T mapped_type;
|
49
|
+
typedef H hasher;
|
50
|
+
typedef P key_equal;
|
51
|
+
typedef A allocator_type;
|
49
52
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
typedef P key_equal;
|
55
|
-
typedef A allocator_type;
|
53
|
+
private:
|
54
|
+
typedef boost::unordered::detail::map<A, K, T, H, P> types;
|
55
|
+
typedef typename types::value_allocator_traits value_allocator_traits;
|
56
|
+
typedef typename types::table table;
|
56
57
|
|
57
|
-
|
58
|
+
public:
|
59
|
+
typedef typename value_allocator_traits::pointer pointer;
|
60
|
+
typedef typename value_allocator_traits::const_pointer const_pointer;
|
58
61
|
|
59
|
-
|
60
|
-
|
61
|
-
typedef typename types::table table;
|
62
|
+
typedef value_type& reference;
|
63
|
+
typedef value_type const& const_reference;
|
62
64
|
|
63
|
-
|
65
|
+
typedef std::size_t size_type;
|
66
|
+
typedef std::ptrdiff_t difference_type;
|
64
67
|
|
65
|
-
|
66
|
-
|
68
|
+
typedef typename table::cl_iterator const_local_iterator;
|
69
|
+
typedef typename table::l_iterator local_iterator;
|
70
|
+
typedef typename table::c_iterator const_iterator;
|
71
|
+
typedef typename table::iterator iterator;
|
72
|
+
typedef typename types::node_type node_type;
|
73
|
+
typedef typename types::insert_return_type insert_return_type;
|
67
74
|
|
68
|
-
|
69
|
-
|
75
|
+
private:
|
76
|
+
table table_;
|
70
77
|
|
71
|
-
|
72
|
-
|
78
|
+
public:
|
79
|
+
// constructors
|
73
80
|
|
74
|
-
|
75
|
-
typedef typename table::l_iterator local_iterator;
|
76
|
-
typedef typename table::c_iterator const_iterator;
|
77
|
-
typedef typename table::iterator iterator;
|
81
|
+
unordered_map();
|
78
82
|
|
79
|
-
|
83
|
+
explicit unordered_map(size_type, const hasher& = hasher(),
|
84
|
+
const key_equal& = key_equal(),
|
85
|
+
const allocator_type& = allocator_type());
|
80
86
|
|
81
|
-
|
87
|
+
explicit unordered_map(size_type, const allocator_type&);
|
82
88
|
|
83
|
-
|
89
|
+
explicit unordered_map(size_type, const hasher&, const allocator_type&);
|
84
90
|
|
85
|
-
|
91
|
+
explicit unordered_map(allocator_type const&);
|
86
92
|
|
87
|
-
|
88
|
-
size_type = boost::unordered::detail::default_bucket_count,
|
89
|
-
const hasher& = hasher(),
|
90
|
-
const key_equal& = key_equal(),
|
91
|
-
const allocator_type& = allocator_type());
|
93
|
+
template <class InputIt> unordered_map(InputIt, InputIt);
|
92
94
|
|
93
|
-
|
95
|
+
template <class InputIt>
|
96
|
+
unordered_map(InputIt, InputIt, size_type, const hasher& = hasher(),
|
97
|
+
const key_equal& = key_equal());
|
94
98
|
|
95
|
-
|
96
|
-
|
99
|
+
template <class InputIt>
|
100
|
+
unordered_map(InputIt, InputIt, size_type, const hasher&, const key_equal&,
|
101
|
+
const allocator_type&);
|
97
102
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
size_type,
|
102
|
-
const hasher& = hasher(),
|
103
|
-
const key_equal& = key_equal());
|
103
|
+
template <class InputIt>
|
104
|
+
unordered_map(
|
105
|
+
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
|
104
106
|
|
105
|
-
|
106
|
-
|
107
|
-
InputIt, InputIt,
|
108
|
-
size_type,
|
109
|
-
const hasher&,
|
110
|
-
const key_equal&,
|
111
|
-
const allocator_type&);
|
107
|
+
template <class InputIt>
|
108
|
+
unordered_map(InputIt, InputIt, size_type, const allocator_type&);
|
112
109
|
|
113
|
-
|
110
|
+
// copy/move constructors
|
114
111
|
|
115
|
-
|
112
|
+
unordered_map(unordered_map const&);
|
116
113
|
|
117
|
-
|
114
|
+
unordered_map(unordered_map const&, allocator_type const&);
|
115
|
+
unordered_map(BOOST_RV_REF(unordered_map), allocator_type const&);
|
118
116
|
|
119
117
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
118
|
+
unordered_map(BOOST_RV_REF(unordered_map) other)
|
119
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
120
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
121
|
+
{
|
122
|
+
}
|
125
123
|
#elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
#endif
|
132
|
-
|
133
|
-
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
134
|
-
unordered_map(unordered_map&&, allocator_type const&);
|
124
|
+
unordered_map(unordered_map&& other)
|
125
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
126
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
127
|
+
{
|
128
|
+
}
|
135
129
|
#endif
|
136
130
|
|
137
131
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
132
|
+
unordered_map(std::initializer_list<value_type>,
|
133
|
+
size_type = boost::unordered::detail::default_bucket_count,
|
134
|
+
const hasher& = hasher(), const key_equal& l = key_equal(),
|
135
|
+
const allocator_type& = allocator_type());
|
136
|
+
unordered_map(std::initializer_list<value_type>, size_type, const hasher&,
|
137
|
+
const allocator_type&);
|
138
|
+
unordered_map(
|
139
|
+
std::initializer_list<value_type>, size_type, const allocator_type&);
|
144
140
|
#endif
|
145
141
|
|
146
|
-
|
142
|
+
// Destructor
|
147
143
|
|
148
|
-
|
144
|
+
~unordered_map() BOOST_NOEXCEPT;
|
149
145
|
|
150
|
-
|
146
|
+
// Assign
|
151
147
|
|
152
148
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
149
|
+
unordered_map& operator=(BOOST_COPY_ASSIGN_REF(unordered_map) x)
|
150
|
+
{
|
151
|
+
table_.assign(x.table_);
|
152
|
+
return *this;
|
153
|
+
}
|
158
154
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
155
|
+
unordered_map& operator=(BOOST_RV_REF(unordered_map) x)
|
156
|
+
{
|
157
|
+
table_.move_assign(x.table_);
|
158
|
+
return *this;
|
159
|
+
}
|
164
160
|
#else
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
161
|
+
unordered_map& operator=(unordered_map const& x)
|
162
|
+
{
|
163
|
+
table_.assign(x.table_);
|
164
|
+
return *this;
|
165
|
+
}
|
170
166
|
|
171
167
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
168
|
+
unordered_map& operator=(unordered_map&& x)
|
169
|
+
{
|
170
|
+
table_.move_assign(x.table_);
|
171
|
+
return *this;
|
172
|
+
}
|
177
173
|
#endif
|
178
174
|
#endif
|
179
175
|
|
180
176
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
181
|
-
|
177
|
+
unordered_map& operator=(std::initializer_list<value_type>);
|
182
178
|
#endif
|
183
179
|
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
180
|
+
allocator_type get_allocator() const BOOST_NOEXCEPT
|
181
|
+
{
|
182
|
+
return table_.node_alloc();
|
183
|
+
}
|
188
184
|
|
189
|
-
|
185
|
+
// size and capacity
|
190
186
|
|
191
|
-
|
192
|
-
{
|
193
|
-
return table_.size_ == 0;
|
194
|
-
}
|
187
|
+
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
195
188
|
|
196
|
-
|
197
|
-
{
|
198
|
-
return table_.size_;
|
199
|
-
}
|
189
|
+
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
200
190
|
|
201
|
-
|
191
|
+
size_type max_size() const BOOST_NOEXCEPT;
|
202
192
|
|
203
|
-
|
193
|
+
// iterators
|
204
194
|
|
205
|
-
|
206
|
-
{
|
207
|
-
return table_.begin();
|
208
|
-
}
|
195
|
+
iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
|
209
196
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
197
|
+
const_iterator begin() const BOOST_NOEXCEPT
|
198
|
+
{
|
199
|
+
return const_iterator(table_.begin());
|
200
|
+
}
|
214
201
|
|
215
|
-
|
216
|
-
{
|
217
|
-
return iterator();
|
218
|
-
}
|
202
|
+
iterator end() BOOST_NOEXCEPT { return iterator(); }
|
219
203
|
|
220
|
-
|
221
|
-
{
|
222
|
-
return const_iterator();
|
223
|
-
}
|
204
|
+
const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
|
224
205
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
206
|
+
const_iterator cbegin() const BOOST_NOEXCEPT
|
207
|
+
{
|
208
|
+
return const_iterator(table_.begin());
|
209
|
+
}
|
229
210
|
|
230
|
-
|
231
|
-
{
|
232
|
-
return const_iterator();
|
233
|
-
}
|
211
|
+
const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
|
234
212
|
|
235
|
-
|
213
|
+
// extract
|
214
|
+
|
215
|
+
node_type extract(const_iterator position)
|
216
|
+
{
|
217
|
+
return node_type(
|
218
|
+
table_.extract_by_iterator(position), table_.node_alloc());
|
219
|
+
}
|
220
|
+
|
221
|
+
node_type extract(const key_type& k)
|
222
|
+
{
|
223
|
+
return node_type(table_.extract_by_key(k), table_.node_alloc());
|
224
|
+
}
|
225
|
+
|
226
|
+
// emplace
|
236
227
|
|
237
228
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
229
|
+
template <class... Args>
|
230
|
+
std::pair<iterator, bool> emplace(BOOST_FWD_REF(Args)... args)
|
231
|
+
{
|
232
|
+
return table_.emplace(boost::forward<Args>(args)...);
|
233
|
+
}
|
243
234
|
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
235
|
+
template <class... Args>
|
236
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
|
237
|
+
{
|
238
|
+
return table_.emplace_hint(hint, boost::forward<Args>(args)...);
|
239
|
+
}
|
240
|
+
|
241
|
+
template <class... Args>
|
242
|
+
std::pair<iterator, bool> try_emplace(
|
243
|
+
key_type const& k, BOOST_FWD_REF(Args)... args)
|
244
|
+
{
|
245
|
+
return table_.try_emplace_impl(k, boost::forward<Args>(args)...);
|
246
|
+
}
|
247
|
+
|
248
|
+
template <class... Args>
|
249
|
+
iterator try_emplace(
|
250
|
+
const_iterator hint, key_type const& k, BOOST_FWD_REF(Args)... args)
|
251
|
+
{
|
252
|
+
return table_.try_emplace_hint_impl(
|
253
|
+
hint, k, boost::forward<Args>(args)...);
|
254
|
+
}
|
255
|
+
|
256
|
+
template <class... Args>
|
257
|
+
std::pair<iterator, bool> try_emplace(
|
258
|
+
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
|
259
|
+
{
|
260
|
+
return table_.try_emplace_impl(
|
261
|
+
boost::move(k), boost::forward<Args>(args)...);
|
262
|
+
}
|
263
|
+
|
264
|
+
template <class... Args>
|
265
|
+
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
|
266
|
+
BOOST_FWD_REF(Args)... args)
|
267
|
+
{
|
268
|
+
return table_.try_emplace_hint_impl(
|
269
|
+
hint, boost::move(k), boost::forward<Args>(args)...);
|
270
|
+
}
|
249
271
|
#else
|
250
272
|
|
251
273
|
#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
|
252
274
|
|
253
|
-
|
254
|
-
|
255
|
-
|
275
|
+
// 0 argument emplace requires special treatment in case
|
276
|
+
// the container is instantiated with a value type that
|
277
|
+
// doesn't have a default constructor.
|
256
278
|
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
279
|
+
std::pair<iterator, bool> emplace(
|
280
|
+
boost::unordered::detail::empty_emplace =
|
281
|
+
boost::unordered::detail::empty_emplace(),
|
282
|
+
value_type v = value_type())
|
283
|
+
{
|
284
|
+
return this->emplace(boost::move(v));
|
285
|
+
}
|
264
286
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
}
|
287
|
+
iterator emplace_hint(const_iterator hint,
|
288
|
+
boost::unordered::detail::empty_emplace =
|
289
|
+
boost::unordered::detail::empty_emplace(),
|
290
|
+
value_type v = value_type())
|
291
|
+
{
|
292
|
+
return this->emplace_hint(hint, boost::move(v));
|
293
|
+
}
|
273
294
|
|
274
295
|
#endif
|
275
296
|
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
boost::forward<A0>(a0))
|
282
|
-
);
|
283
|
-
}
|
297
|
+
template <typename Key>
|
298
|
+
std::pair<iterator, bool> try_emplace(BOOST_FWD_REF(Key) k)
|
299
|
+
{
|
300
|
+
return table_.try_emplace_impl(boost::forward<Key>(k));
|
301
|
+
}
|
284
302
|
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
boost::forward<A0>(a0))
|
291
|
-
).first;
|
292
|
-
}
|
303
|
+
template <typename Key>
|
304
|
+
iterator try_emplace(const_iterator hint, BOOST_FWD_REF(Key) k)
|
305
|
+
{
|
306
|
+
return table_.try_emplace_hint_impl(hint, boost::forward<Key>(k));
|
307
|
+
}
|
293
308
|
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
boost::unordered::detail::create_emplace_args(
|
301
|
-
boost::forward<A0>(a0),
|
302
|
-
boost::forward<A1>(a1))
|
303
|
-
);
|
304
|
-
}
|
309
|
+
template <typename A0>
|
310
|
+
std::pair<iterator, bool> emplace(BOOST_FWD_REF(A0) a0)
|
311
|
+
{
|
312
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
313
|
+
boost::forward<A0>(a0)));
|
314
|
+
}
|
305
315
|
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
boost::forward<A0>(a0),
|
314
|
-
boost::forward<A1>(a1))
|
315
|
-
).first;
|
316
|
-
}
|
316
|
+
template <typename A0>
|
317
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
|
318
|
+
{
|
319
|
+
return table_.emplace_hint(
|
320
|
+
hint, boost::unordered::detail::create_emplace_args(
|
321
|
+
boost::forward<A0>(a0)));
|
322
|
+
}
|
317
323
|
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
boost::forward<A0>(a0),
|
327
|
-
boost::forward<A1>(a1),
|
328
|
-
boost::forward<A2>(a2))
|
329
|
-
);
|
330
|
-
}
|
324
|
+
template <typename A0>
|
325
|
+
std::pair<iterator, bool> try_emplace(
|
326
|
+
key_type const& k, BOOST_FWD_REF(A0) a0)
|
327
|
+
{
|
328
|
+
return table_.try_emplace_impl(
|
329
|
+
k, boost::unordered::detail::create_emplace_args(
|
330
|
+
boost::forward<A0>(a0)));
|
331
|
+
}
|
331
332
|
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
boost::forward<A0>(a0),
|
341
|
-
boost::forward<A1>(a1),
|
342
|
-
boost::forward<A2>(a2))
|
343
|
-
).first;
|
344
|
-
}
|
333
|
+
template <typename A0>
|
334
|
+
iterator try_emplace(
|
335
|
+
const_iterator hint, key_type const& k, BOOST_FWD_REF(A0) a0)
|
336
|
+
{
|
337
|
+
return table_.try_emplace_hint_impl(
|
338
|
+
hint, k, boost::unordered::detail::create_emplace_args(
|
339
|
+
boost::forward<A0>(a0)));
|
340
|
+
}
|
345
341
|
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
342
|
+
template <typename A0>
|
343
|
+
std::pair<iterator, bool> try_emplace(
|
344
|
+
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
|
345
|
+
{
|
346
|
+
return table_.try_emplace_impl(
|
347
|
+
boost::move(k), boost::unordered::detail::create_emplace_args(
|
348
|
+
boost::forward<A0>(a0)));
|
349
|
+
}
|
350
|
+
|
351
|
+
template <typename A0>
|
352
|
+
iterator try_emplace(
|
353
|
+
const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0)
|
354
|
+
{
|
355
|
+
return table_.try_emplace_hint_impl(
|
356
|
+
hint, boost::move(k), boost::unordered::detail::create_emplace_args(
|
357
|
+
boost::forward<A0>(a0)));
|
358
|
+
}
|
359
|
+
|
360
|
+
template <typename A0, typename A1>
|
361
|
+
std::pair<iterator, bool> emplace(
|
362
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
363
|
+
{
|
364
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
365
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
366
|
+
}
|
367
|
+
|
368
|
+
template <typename A0, typename A1>
|
369
|
+
iterator emplace_hint(
|
370
|
+
const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
371
|
+
{
|
372
|
+
return table_.emplace_hint(
|
373
|
+
hint, boost::unordered::detail::create_emplace_args(
|
374
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
375
|
+
}
|
376
|
+
|
377
|
+
template <typename A0, typename A1>
|
378
|
+
std::pair<iterator, bool> try_emplace(
|
379
|
+
key_type const& k, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
380
|
+
{
|
381
|
+
return table_.try_emplace_impl(
|
382
|
+
k, boost::unordered::detail::create_emplace_args(
|
383
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
384
|
+
}
|
375
385
|
|
376
|
-
|
377
|
-
|
386
|
+
template <typename A0, typename A1>
|
387
|
+
iterator try_emplace(const_iterator hint, key_type const& k,
|
388
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
389
|
+
{
|
390
|
+
return table_.try_emplace_hint_impl(
|
391
|
+
hint, k, boost::unordered::detail::create_emplace_args(
|
392
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
393
|
+
}
|
394
|
+
|
395
|
+
template <typename A0, typename A1>
|
396
|
+
std::pair<iterator, bool> try_emplace(
|
397
|
+
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
398
|
+
{
|
399
|
+
return table_.try_emplace_impl(
|
400
|
+
boost::move(k),
|
401
|
+
boost::unordered::detail::create_emplace_args(
|
402
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
403
|
+
}
|
404
|
+
|
405
|
+
template <typename A0, typename A1>
|
406
|
+
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
|
407
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
408
|
+
{
|
409
|
+
return table_.try_emplace_hint_impl(
|
410
|
+
hint, boost::move(k),
|
411
|
+
boost::unordered::detail::create_emplace_args(
|
412
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
413
|
+
}
|
414
|
+
|
415
|
+
template <typename A0, typename A1, typename A2>
|
416
|
+
std::pair<iterator, bool> emplace(
|
417
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
418
|
+
{
|
419
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
420
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
421
|
+
boost::forward<A2>(a2)));
|
422
|
+
}
|
423
|
+
|
424
|
+
template <typename A0, typename A1, typename A2>
|
425
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
|
426
|
+
BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
427
|
+
{
|
428
|
+
return table_.emplace_hint(
|
429
|
+
hint, boost::unordered::detail::create_emplace_args(
|
430
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
431
|
+
boost::forward<A2>(a2)));
|
432
|
+
}
|
433
|
+
|
434
|
+
template <typename A0, typename A1, typename A2>
|
435
|
+
std::pair<iterator, bool> try_emplace(key_type const& k,
|
436
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
437
|
+
{
|
438
|
+
return table_.try_emplace_impl(
|
439
|
+
k, boost::unordered::detail::create_emplace_args(
|
440
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
441
|
+
boost::forward<A2>(a2)));
|
442
|
+
}
|
443
|
+
|
444
|
+
template <typename A0, typename A1, typename A2>
|
445
|
+
iterator try_emplace(const_iterator hint, key_type const& k,
|
446
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
447
|
+
{
|
448
|
+
return table_
|
449
|
+
.try_emplace_impl_(
|
450
|
+
hint, k, boost::unordered::detail::create_emplace_args(
|
451
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
452
|
+
boost::forward<A2>(a2)))
|
453
|
+
.first;
|
454
|
+
}
|
455
|
+
|
456
|
+
template <typename A0, typename A1, typename A2>
|
457
|
+
std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k,
|
458
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
459
|
+
{
|
460
|
+
return table_.try_emplace_impl(
|
461
|
+
boost::move(k), boost::unordered::detail::create_emplace_args(
|
462
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
463
|
+
boost::forward<A2>(a2)));
|
464
|
+
}
|
465
|
+
|
466
|
+
template <typename A0, typename A1, typename A2>
|
467
|
+
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k,
|
468
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
469
|
+
{
|
470
|
+
return table_.try_emplace_hint_impl(
|
471
|
+
hint, boost::move(k),
|
472
|
+
boost::unordered::detail::create_emplace_args(
|
473
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
474
|
+
boost::forward<A2>(a2)));
|
475
|
+
}
|
476
|
+
|
477
|
+
#define BOOST_UNORDERED_EMPLACE(z, n, _) \
|
478
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
479
|
+
std::pair<iterator, bool> emplace( \
|
480
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
481
|
+
{ \
|
482
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args( \
|
483
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
484
|
+
} \
|
485
|
+
\
|
486
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
487
|
+
iterator emplace_hint(const_iterator hint, \
|
488
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
489
|
+
{ \
|
490
|
+
return table_.emplace_hint( \
|
491
|
+
hint, boost::unordered::detail::create_emplace_args( \
|
492
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
493
|
+
} \
|
494
|
+
\
|
495
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
496
|
+
std::pair<iterator, bool> try_emplace( \
|
497
|
+
key_type const& k, BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
498
|
+
{ \
|
499
|
+
return table_.try_emplace_impl( \
|
500
|
+
k, boost::unordered::detail::create_emplace_args( \
|
501
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
502
|
+
} \
|
503
|
+
\
|
504
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
505
|
+
iterator try_emplace(const_iterator hint, key_type const& k, \
|
506
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
507
|
+
{ \
|
508
|
+
return table_.try_emplace_hint_impl(hint, k, \
|
509
|
+
boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
|
510
|
+
n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
511
|
+
} \
|
512
|
+
\
|
513
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
514
|
+
std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, \
|
515
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
516
|
+
{ \
|
517
|
+
return table_.try_emplace_impl(boost::move(k), \
|
518
|
+
boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
|
519
|
+
n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
520
|
+
} \
|
521
|
+
\
|
522
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
523
|
+
iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, \
|
524
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
525
|
+
{ \
|
526
|
+
return table_.try_emplace_hint_impl(hint, boost::move(k), \
|
527
|
+
boost::unordered::detail::create_emplace_args(BOOST_PP_ENUM_##z( \
|
528
|
+
n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
529
|
+
}
|
530
|
+
|
531
|
+
BOOST_PP_REPEAT_FROM_TO(
|
532
|
+
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
378
533
|
|
379
534
|
#undef BOOST_UNORDERED_EMPLACE
|
380
535
|
|
381
536
|
#endif
|
382
537
|
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
538
|
+
std::pair<iterator, bool> insert(value_type const& x)
|
539
|
+
{
|
540
|
+
return this->emplace(x);
|
541
|
+
}
|
387
542
|
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
543
|
+
std::pair<iterator, bool> insert(BOOST_RV_REF(value_type) x)
|
544
|
+
{
|
545
|
+
return this->emplace(boost::move(x));
|
546
|
+
}
|
392
547
|
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
548
|
+
iterator insert(const_iterator hint, value_type const& x)
|
549
|
+
{
|
550
|
+
return this->emplace_hint(hint, x);
|
551
|
+
}
|
397
552
|
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
553
|
+
iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
|
554
|
+
{
|
555
|
+
return this->emplace_hint(hint, boost::move(x));
|
556
|
+
}
|
557
|
+
|
558
|
+
template <class M>
|
559
|
+
std::pair<iterator, bool> insert_or_assign(
|
560
|
+
key_type const& k, BOOST_FWD_REF(M) obj)
|
561
|
+
{
|
562
|
+
return table_.insert_or_assign_impl(k, boost::forward<M>(obj));
|
563
|
+
}
|
564
|
+
|
565
|
+
template <class M>
|
566
|
+
iterator insert_or_assign(
|
567
|
+
const_iterator, key_type const& k, BOOST_FWD_REF(M) obj)
|
568
|
+
{
|
569
|
+
return table_.insert_or_assign_impl(k, boost::forward<M>(obj)).first;
|
570
|
+
}
|
571
|
+
|
572
|
+
template <class M>
|
573
|
+
std::pair<iterator, bool> insert_or_assign(
|
574
|
+
BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
|
575
|
+
{
|
576
|
+
return table_.insert_or_assign_impl(
|
577
|
+
boost::move(k), boost::forward<M>(obj));
|
578
|
+
}
|
402
579
|
|
403
|
-
|
580
|
+
template <class M>
|
581
|
+
iterator insert_or_assign(
|
582
|
+
const_iterator, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
|
583
|
+
{
|
584
|
+
return table_
|
585
|
+
.insert_or_assign_impl(boost::move(k), boost::forward<M>(obj))
|
586
|
+
.first;
|
587
|
+
}
|
588
|
+
|
589
|
+
template <class InputIt> void insert(InputIt, InputIt);
|
404
590
|
|
405
591
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
406
|
-
|
592
|
+
void insert(std::initializer_list<value_type>);
|
407
593
|
#endif
|
408
594
|
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
595
|
+
insert_return_type insert(BOOST_RV_REF(node_type) np)
|
596
|
+
{
|
597
|
+
insert_return_type result;
|
598
|
+
table_.move_insert_node_type(np, result);
|
599
|
+
return boost::move(result);
|
600
|
+
}
|
414
601
|
|
415
|
-
|
416
|
-
|
602
|
+
iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
|
603
|
+
{
|
604
|
+
return table_.move_insert_node_type_with_hint(hint, np);
|
605
|
+
}
|
417
606
|
|
418
|
-
|
607
|
+
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
608
|
+
private:
|
609
|
+
// Note: Use r-value node_type to insert.
|
610
|
+
insert_return_type insert(node_type&);
|
611
|
+
iterator insert(const_iterator, node_type& np);
|
419
612
|
|
420
|
-
|
421
|
-
|
613
|
+
public:
|
614
|
+
#endif
|
422
615
|
|
423
|
-
|
424
|
-
|
425
|
-
|
616
|
+
iterator erase(const_iterator);
|
617
|
+
size_type erase(const key_type&);
|
618
|
+
iterator erase(const_iterator, const_iterator);
|
619
|
+
void quick_erase(const_iterator it) { erase(it); }
|
620
|
+
void erase_return_void(const_iterator it) { erase(it); }
|
426
621
|
|
427
|
-
|
622
|
+
void clear();
|
623
|
+
void swap(unordered_map&);
|
428
624
|
|
429
|
-
|
430
|
-
|
625
|
+
template <typename H2, typename P2>
|
626
|
+
void merge(boost::unordered_map<K, T, H2, P2, A>& source);
|
431
627
|
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
CompatibleHash const&,
|
437
|
-
CompatiblePredicate const&);
|
628
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
629
|
+
template <typename H2, typename P2>
|
630
|
+
void merge(boost::unordered_map<K, T, H2, P2, A>&& source);
|
631
|
+
#endif
|
438
632
|
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
CompatibleKey const&,
|
443
|
-
CompatibleHash const&,
|
444
|
-
CompatiblePredicate const&) const;
|
633
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
634
|
+
template <typename H2, typename P2>
|
635
|
+
void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
|
445
636
|
|
446
|
-
|
637
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
638
|
+
template <typename H2, typename P2>
|
639
|
+
void merge(boost::unordered_multimap<K, T, H2, P2, A>&& source);
|
640
|
+
#endif
|
641
|
+
#endif
|
447
642
|
|
448
|
-
|
449
|
-
equal_range(const key_type&);
|
450
|
-
std::pair<const_iterator, const_iterator>
|
451
|
-
equal_range(const key_type&) const;
|
643
|
+
// observers
|
452
644
|
|
453
|
-
|
645
|
+
hasher hash_function() const;
|
646
|
+
key_equal key_eq() const;
|
454
647
|
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
}
|
648
|
+
mapped_type& operator[](const key_type&);
|
649
|
+
mapped_type& at(const key_type&);
|
650
|
+
mapped_type const& at(const key_type&) const;
|
459
651
|
|
460
|
-
|
461
|
-
{
|
462
|
-
return table_.max_bucket_count();
|
463
|
-
}
|
652
|
+
// lookup
|
464
653
|
|
465
|
-
|
654
|
+
iterator find(const key_type&);
|
655
|
+
const_iterator find(const key_type&) const;
|
466
656
|
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
657
|
+
template <class CompatibleKey, class CompatibleHash,
|
658
|
+
class CompatiblePredicate>
|
659
|
+
iterator find(CompatibleKey const&, CompatibleHash const&,
|
660
|
+
CompatiblePredicate const&);
|
471
661
|
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
}
|
662
|
+
template <class CompatibleKey, class CompatibleHash,
|
663
|
+
class CompatiblePredicate>
|
664
|
+
const_iterator find(CompatibleKey const&, CompatibleHash const&,
|
665
|
+
CompatiblePredicate const&) const;
|
477
666
|
|
478
|
-
|
479
|
-
{
|
480
|
-
return const_local_iterator(
|
481
|
-
table_.begin(n), n, table_.bucket_count_);
|
482
|
-
}
|
667
|
+
size_type count(const key_type&) const;
|
483
668
|
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
}
|
669
|
+
std::pair<iterator, iterator> equal_range(const key_type&);
|
670
|
+
std::pair<const_iterator, const_iterator> equal_range(
|
671
|
+
const key_type&) const;
|
488
672
|
|
489
|
-
|
490
|
-
{
|
491
|
-
return const_local_iterator();
|
492
|
-
}
|
673
|
+
// bucket interface
|
493
674
|
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
}
|
675
|
+
size_type bucket_count() const BOOST_NOEXCEPT
|
676
|
+
{
|
677
|
+
return table_.bucket_count_;
|
678
|
+
}
|
499
679
|
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
680
|
+
size_type max_bucket_count() const BOOST_NOEXCEPT
|
681
|
+
{
|
682
|
+
return table_.max_bucket_count();
|
683
|
+
}
|
504
684
|
|
505
|
-
|
685
|
+
size_type bucket_size(size_type) const;
|
506
686
|
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
687
|
+
size_type bucket(const key_type& k) const
|
688
|
+
{
|
689
|
+
return table_.hash_to_bucket(table_.hash(k));
|
690
|
+
}
|
691
|
+
|
692
|
+
local_iterator begin(size_type n)
|
693
|
+
{
|
694
|
+
return local_iterator(table_.begin(n), n, table_.bucket_count_);
|
695
|
+
}
|
696
|
+
|
697
|
+
const_local_iterator begin(size_type n) const
|
698
|
+
{
|
699
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
700
|
+
}
|
701
|
+
|
702
|
+
local_iterator end(size_type) { return local_iterator(); }
|
703
|
+
|
704
|
+
const_local_iterator end(size_type) const { return const_local_iterator(); }
|
705
|
+
|
706
|
+
const_local_iterator cbegin(size_type n) const
|
707
|
+
{
|
708
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
709
|
+
}
|
710
|
+
|
711
|
+
const_local_iterator cend(size_type) const
|
712
|
+
{
|
713
|
+
return const_local_iterator();
|
714
|
+
}
|
715
|
+
|
716
|
+
// hash policy
|
717
|
+
|
718
|
+
float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
|
511
719
|
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
720
|
+
float load_factor() const BOOST_NOEXCEPT;
|
721
|
+
void max_load_factor(float) BOOST_NOEXCEPT;
|
722
|
+
void rehash(size_type);
|
723
|
+
void reserve(size_type);
|
516
724
|
|
517
725
|
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
726
|
+
friend bool operator==
|
727
|
+
<K, T, H, P, A>(unordered_map const&, unordered_map const&);
|
728
|
+
friend bool operator!=
|
729
|
+
<K, T, H, P, A>(unordered_map const&, unordered_map const&);
|
522
730
|
#endif
|
523
|
-
|
731
|
+
}; // class template unordered_map
|
524
732
|
|
525
|
-
|
526
|
-
|
527
|
-
{
|
733
|
+
template <class K, class T, class H, class P, class A> class unordered_multimap
|
734
|
+
{
|
528
735
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
529
|
-
|
736
|
+
BOOST_COPYABLE_AND_MOVABLE(unordered_multimap)
|
530
737
|
#endif
|
531
|
-
|
738
|
+
template <typename, typename, typename, typename, typename>
|
739
|
+
friend class unordered_map;
|
740
|
+
|
741
|
+
public:
|
742
|
+
typedef K key_type;
|
743
|
+
typedef std::pair<const K, T> value_type;
|
744
|
+
typedef T mapped_type;
|
745
|
+
typedef H hasher;
|
746
|
+
typedef P key_equal;
|
747
|
+
typedef A allocator_type;
|
748
|
+
|
749
|
+
private:
|
750
|
+
typedef boost::unordered::detail::multimap<A, K, T, H, P> types;
|
751
|
+
typedef typename types::value_allocator_traits value_allocator_traits;
|
752
|
+
typedef typename types::table table;
|
532
753
|
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
typedef H hasher;
|
537
|
-
typedef P key_equal;
|
538
|
-
typedef A allocator_type;
|
754
|
+
public:
|
755
|
+
typedef typename value_allocator_traits::pointer pointer;
|
756
|
+
typedef typename value_allocator_traits::const_pointer const_pointer;
|
539
757
|
|
540
|
-
|
758
|
+
typedef value_type& reference;
|
759
|
+
typedef value_type const& const_reference;
|
541
760
|
|
542
|
-
|
543
|
-
|
544
|
-
typedef typename types::table table;
|
761
|
+
typedef std::size_t size_type;
|
762
|
+
typedef std::ptrdiff_t difference_type;
|
545
763
|
|
546
|
-
|
764
|
+
typedef typename table::cl_iterator const_local_iterator;
|
765
|
+
typedef typename table::l_iterator local_iterator;
|
766
|
+
typedef typename table::c_iterator const_iterator;
|
767
|
+
typedef typename table::iterator iterator;
|
768
|
+
typedef typename types::node_type node_type;
|
547
769
|
|
548
|
-
|
549
|
-
|
770
|
+
private:
|
771
|
+
table table_;
|
550
772
|
|
551
|
-
|
552
|
-
|
773
|
+
public:
|
774
|
+
// constructors
|
553
775
|
|
554
|
-
|
555
|
-
typedef std::ptrdiff_t difference_type;
|
776
|
+
unordered_multimap();
|
556
777
|
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
typedef typename table::iterator iterator;
|
778
|
+
explicit unordered_multimap(size_type, const hasher& = hasher(),
|
779
|
+
const key_equal& = key_equal(),
|
780
|
+
const allocator_type& = allocator_type());
|
561
781
|
|
562
|
-
|
782
|
+
explicit unordered_multimap(size_type, const allocator_type&);
|
563
783
|
|
564
|
-
|
565
|
-
|
566
|
-
public:
|
784
|
+
explicit unordered_multimap(
|
785
|
+
size_type, const hasher&, const allocator_type&);
|
567
786
|
|
568
|
-
|
787
|
+
explicit unordered_multimap(allocator_type const&);
|
569
788
|
|
570
|
-
|
571
|
-
size_type = boost::unordered::detail::default_bucket_count,
|
572
|
-
const hasher& = hasher(),
|
573
|
-
const key_equal& = key_equal(),
|
574
|
-
const allocator_type& = allocator_type());
|
789
|
+
template <class InputIt> unordered_multimap(InputIt, InputIt);
|
575
790
|
|
576
|
-
|
791
|
+
template <class InputIt>
|
792
|
+
unordered_multimap(InputIt, InputIt, size_type, const hasher& = hasher(),
|
793
|
+
const key_equal& = key_equal());
|
577
794
|
|
578
|
-
|
579
|
-
|
795
|
+
template <class InputIt>
|
796
|
+
unordered_multimap(InputIt, InputIt, size_type, const hasher&,
|
797
|
+
const key_equal&, const allocator_type&);
|
580
798
|
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
size_type,
|
585
|
-
const hasher& = hasher(),
|
586
|
-
const key_equal& = key_equal());
|
799
|
+
template <class InputIt>
|
800
|
+
unordered_multimap(
|
801
|
+
InputIt, InputIt, size_type, const hasher&, const allocator_type&);
|
587
802
|
|
588
|
-
|
589
|
-
|
590
|
-
InputIt, InputIt,
|
591
|
-
size_type,
|
592
|
-
const hasher&,
|
593
|
-
const key_equal&,
|
594
|
-
const allocator_type&);
|
803
|
+
template <class InputIt>
|
804
|
+
unordered_multimap(InputIt, InputIt, size_type, const allocator_type&);
|
595
805
|
|
596
|
-
|
806
|
+
// copy/move constructors
|
597
807
|
|
598
|
-
|
808
|
+
unordered_multimap(unordered_multimap const&);
|
599
809
|
|
600
|
-
|
810
|
+
unordered_multimap(unordered_multimap const&, allocator_type const&);
|
811
|
+
unordered_multimap(BOOST_RV_REF(unordered_multimap), allocator_type const&);
|
601
812
|
|
602
813
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
814
|
+
unordered_multimap(BOOST_RV_REF(unordered_multimap) other)
|
815
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
816
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
817
|
+
{
|
818
|
+
}
|
608
819
|
#elif !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
#endif
|
615
|
-
|
616
|
-
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
617
|
-
unordered_multimap(unordered_multimap&&, allocator_type const&);
|
820
|
+
unordered_multimap(unordered_multimap&& other)
|
821
|
+
BOOST_NOEXCEPT_IF(table::nothrow_move_constructible)
|
822
|
+
: table_(other.table_, boost::unordered::detail::move_tag())
|
823
|
+
{
|
824
|
+
}
|
618
825
|
#endif
|
619
826
|
|
620
827
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
828
|
+
unordered_multimap(std::initializer_list<value_type>,
|
829
|
+
size_type = boost::unordered::detail::default_bucket_count,
|
830
|
+
const hasher& = hasher(), const key_equal& l = key_equal(),
|
831
|
+
const allocator_type& = allocator_type());
|
832
|
+
unordered_multimap(std::initializer_list<value_type>, size_type,
|
833
|
+
const hasher&, const allocator_type&);
|
834
|
+
unordered_multimap(
|
835
|
+
std::initializer_list<value_type>, size_type, const allocator_type&);
|
627
836
|
#endif
|
628
837
|
|
629
|
-
|
838
|
+
// Destructor
|
630
839
|
|
631
|
-
|
840
|
+
~unordered_multimap() BOOST_NOEXCEPT;
|
632
841
|
|
633
|
-
|
842
|
+
// Assign
|
634
843
|
|
635
844
|
#if defined(BOOST_UNORDERED_USE_MOVE)
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
}
|
845
|
+
unordered_multimap& operator=(BOOST_COPY_ASSIGN_REF(unordered_multimap) x)
|
846
|
+
{
|
847
|
+
table_.assign(x.table_);
|
848
|
+
return *this;
|
849
|
+
}
|
642
850
|
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
851
|
+
unordered_multimap& operator=(BOOST_RV_REF(unordered_multimap) x)
|
852
|
+
{
|
853
|
+
table_.move_assign(x.table_);
|
854
|
+
return *this;
|
855
|
+
}
|
648
856
|
#else
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
857
|
+
unordered_multimap& operator=(unordered_multimap const& x)
|
858
|
+
{
|
859
|
+
table_.assign(x.table_);
|
860
|
+
return *this;
|
861
|
+
}
|
654
862
|
|
655
863
|
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
864
|
+
unordered_multimap& operator=(unordered_multimap&& x)
|
865
|
+
{
|
866
|
+
table_.move_assign(x.table_);
|
867
|
+
return *this;
|
868
|
+
}
|
661
869
|
#endif
|
662
870
|
#endif
|
663
871
|
|
664
872
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
665
|
-
|
873
|
+
unordered_multimap& operator=(std::initializer_list<value_type>);
|
666
874
|
#endif
|
667
875
|
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
// size and capacity
|
876
|
+
allocator_type get_allocator() const BOOST_NOEXCEPT
|
877
|
+
{
|
878
|
+
return table_.node_alloc();
|
879
|
+
}
|
674
880
|
|
675
|
-
|
676
|
-
{
|
677
|
-
return table_.size_ == 0;
|
678
|
-
}
|
881
|
+
// size and capacity
|
679
882
|
|
680
|
-
|
681
|
-
{
|
682
|
-
return table_.size_;
|
683
|
-
}
|
883
|
+
bool empty() const BOOST_NOEXCEPT { return table_.size_ == 0; }
|
684
884
|
|
685
|
-
|
885
|
+
size_type size() const BOOST_NOEXCEPT { return table_.size_; }
|
686
886
|
|
687
|
-
|
887
|
+
size_type max_size() const BOOST_NOEXCEPT;
|
688
888
|
|
689
|
-
|
690
|
-
{
|
691
|
-
return table_.begin();
|
692
|
-
}
|
889
|
+
// iterators
|
693
890
|
|
694
|
-
|
695
|
-
{
|
696
|
-
return table_.begin();
|
697
|
-
}
|
891
|
+
iterator begin() BOOST_NOEXCEPT { return iterator(table_.begin()); }
|
698
892
|
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
893
|
+
const_iterator begin() const BOOST_NOEXCEPT
|
894
|
+
{
|
895
|
+
return const_iterator(table_.begin());
|
896
|
+
}
|
703
897
|
|
704
|
-
|
705
|
-
{
|
706
|
-
return const_iterator();
|
707
|
-
}
|
898
|
+
iterator end() BOOST_NOEXCEPT { return iterator(); }
|
708
899
|
|
709
|
-
|
710
|
-
{
|
711
|
-
return table_.begin();
|
712
|
-
}
|
900
|
+
const_iterator end() const BOOST_NOEXCEPT { return const_iterator(); }
|
713
901
|
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
902
|
+
const_iterator cbegin() const BOOST_NOEXCEPT
|
903
|
+
{
|
904
|
+
return const_iterator(table_.begin());
|
905
|
+
}
|
718
906
|
|
719
|
-
|
907
|
+
const_iterator cend() const BOOST_NOEXCEPT { return const_iterator(); }
|
720
908
|
|
721
|
-
|
722
|
-
template <class... Args>
|
723
|
-
iterator emplace(BOOST_FWD_REF(Args)... args)
|
724
|
-
{
|
725
|
-
return table_.emplace(boost::forward<Args>(args)...);
|
726
|
-
}
|
909
|
+
// extract
|
727
910
|
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
#else
|
911
|
+
node_type extract(const_iterator position)
|
912
|
+
{
|
913
|
+
return node_type(
|
914
|
+
table_.extract_by_iterator(position), table_.node_alloc());
|
915
|
+
}
|
734
916
|
|
735
|
-
|
917
|
+
node_type extract(const key_type& k)
|
918
|
+
{
|
919
|
+
return node_type(table_.extract_by_key(k), table_.node_alloc());
|
920
|
+
}
|
736
921
|
|
737
|
-
|
738
|
-
// the container is instantiated with a value type that
|
739
|
-
// doesn't have a default constructor.
|
922
|
+
// emplace
|
740
923
|
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
return this->emplace(boost::move(v));
|
747
|
-
}
|
748
|
-
|
749
|
-
iterator emplace_hint(const_iterator hint,
|
750
|
-
boost::unordered::detail::empty_emplace
|
751
|
-
= boost::unordered::detail::empty_emplace(),
|
752
|
-
value_type v = value_type()
|
753
|
-
)
|
754
|
-
{
|
755
|
-
return this->emplace_hint(hint, boost::move(v));
|
756
|
-
}
|
757
|
-
|
758
|
-
#endif
|
924
|
+
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
925
|
+
template <class... Args> iterator emplace(BOOST_FWD_REF(Args)... args)
|
926
|
+
{
|
927
|
+
return table_.emplace(boost::forward<Args>(args)...);
|
928
|
+
}
|
759
929
|
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
);
|
767
|
-
}
|
930
|
+
template <class... Args>
|
931
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
|
932
|
+
{
|
933
|
+
return table_.emplace_hint(hint, boost::forward<Args>(args)...);
|
934
|
+
}
|
935
|
+
#else
|
768
936
|
|
769
|
-
|
770
|
-
iterator emplace_hint(const_iterator, BOOST_FWD_REF(A0) a0)
|
771
|
-
{
|
772
|
-
return table_.emplace(
|
773
|
-
boost::unordered::detail::create_emplace_args(
|
774
|
-
boost::forward<A0>(a0))
|
775
|
-
);
|
776
|
-
}
|
937
|
+
#if !BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x5100))
|
777
938
|
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
BOOST_FWD_REF(A1) a1)
|
782
|
-
{
|
783
|
-
return table_.emplace(
|
784
|
-
boost::unordered::detail::create_emplace_args(
|
785
|
-
boost::forward<A0>(a0),
|
786
|
-
boost::forward<A1>(a1))
|
787
|
-
);
|
788
|
-
}
|
939
|
+
// 0 argument emplace requires special treatment in case
|
940
|
+
// the container is instantiated with a value type that
|
941
|
+
// doesn't have a default constructor.
|
789
942
|
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
boost::unordered::detail::create_emplace_args(
|
797
|
-
boost::forward<A0>(a0),
|
798
|
-
boost::forward<A1>(a1))
|
799
|
-
);
|
800
|
-
}
|
943
|
+
iterator emplace(boost::unordered::detail::empty_emplace =
|
944
|
+
boost::unordered::detail::empty_emplace(),
|
945
|
+
value_type v = value_type())
|
946
|
+
{
|
947
|
+
return this->emplace(boost::move(v));
|
948
|
+
}
|
801
949
|
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
boost::unordered::detail::create_emplace_args(
|
810
|
-
boost::forward<A0>(a0),
|
811
|
-
boost::forward<A1>(a1),
|
812
|
-
boost::forward<A2>(a2))
|
813
|
-
);
|
814
|
-
}
|
950
|
+
iterator emplace_hint(const_iterator hint,
|
951
|
+
boost::unordered::detail::empty_emplace =
|
952
|
+
boost::unordered::detail::empty_emplace(),
|
953
|
+
value_type v = value_type())
|
954
|
+
{
|
955
|
+
return this->emplace_hint(hint, boost::move(v));
|
956
|
+
}
|
815
957
|
|
816
|
-
|
817
|
-
iterator emplace_hint(const_iterator,
|
818
|
-
BOOST_FWD_REF(A0) a0,
|
819
|
-
BOOST_FWD_REF(A1) a1,
|
820
|
-
BOOST_FWD_REF(A2) a2)
|
821
|
-
{
|
822
|
-
return table_.emplace(
|
823
|
-
boost::unordered::detail::create_emplace_args(
|
824
|
-
boost::forward<A0>(a0),
|
825
|
-
boost::forward<A1>(a1),
|
826
|
-
boost::forward<A2>(a2))
|
827
|
-
);
|
828
|
-
}
|
958
|
+
#endif
|
829
959
|
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
>
|
834
|
-
|
835
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
836
|
-
) \
|
837
|
-
{ \
|
838
|
-
return table_.emplace( \
|
839
|
-
boost::unordered::detail::create_emplace_args( \
|
840
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
841
|
-
a) \
|
842
|
-
)); \
|
843
|
-
} \
|
844
|
-
\
|
845
|
-
template < \
|
846
|
-
BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \
|
847
|
-
> \
|
848
|
-
iterator emplace_hint( \
|
849
|
-
const_iterator, \
|
850
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a) \
|
851
|
-
) \
|
852
|
-
{ \
|
853
|
-
return table_.emplace( \
|
854
|
-
boost::unordered::detail::create_emplace_args( \
|
855
|
-
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, \
|
856
|
-
a) \
|
857
|
-
)); \
|
858
|
-
}
|
960
|
+
template <typename A0> iterator emplace(BOOST_FWD_REF(A0) a0)
|
961
|
+
{
|
962
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
963
|
+
boost::forward<A0>(a0)));
|
964
|
+
}
|
859
965
|
|
860
|
-
|
861
|
-
|
966
|
+
template <typename A0>
|
967
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0)
|
968
|
+
{
|
969
|
+
return table_.emplace_hint(
|
970
|
+
hint, boost::unordered::detail::create_emplace_args(
|
971
|
+
boost::forward<A0>(a0)));
|
972
|
+
}
|
862
973
|
|
863
|
-
|
974
|
+
template <typename A0, typename A1>
|
975
|
+
iterator emplace(BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
976
|
+
{
|
977
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
978
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
979
|
+
}
|
864
980
|
|
865
|
-
|
981
|
+
template <typename A0, typename A1>
|
982
|
+
iterator emplace_hint(
|
983
|
+
const_iterator hint, BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1)
|
984
|
+
{
|
985
|
+
return table_.emplace_hint(
|
986
|
+
hint, boost::unordered::detail::create_emplace_args(
|
987
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1)));
|
988
|
+
}
|
866
989
|
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
990
|
+
template <typename A0, typename A1, typename A2>
|
991
|
+
iterator emplace(
|
992
|
+
BOOST_FWD_REF(A0) a0, BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
993
|
+
{
|
994
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args(
|
995
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
996
|
+
boost::forward<A2>(a2)));
|
997
|
+
}
|
871
998
|
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
999
|
+
template <typename A0, typename A1, typename A2>
|
1000
|
+
iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(A0) a0,
|
1001
|
+
BOOST_FWD_REF(A1) a1, BOOST_FWD_REF(A2) a2)
|
1002
|
+
{
|
1003
|
+
return table_.emplace_hint(
|
1004
|
+
hint, boost::unordered::detail::create_emplace_args(
|
1005
|
+
boost::forward<A0>(a0), boost::forward<A1>(a1),
|
1006
|
+
boost::forward<A2>(a2)));
|
1007
|
+
}
|
876
1008
|
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
1009
|
+
#define BOOST_UNORDERED_EMPLACE(z, n, _) \
|
1010
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
1011
|
+
iterator emplace(BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
1012
|
+
{ \
|
1013
|
+
return table_.emplace(boost::unordered::detail::create_emplace_args( \
|
1014
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
1015
|
+
} \
|
1016
|
+
\
|
1017
|
+
template <BOOST_PP_ENUM_PARAMS_Z(z, n, typename A)> \
|
1018
|
+
iterator emplace_hint(const_iterator hint, \
|
1019
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_FWD_PARAM, a)) \
|
1020
|
+
{ \
|
1021
|
+
return table_.emplace_hint( \
|
1022
|
+
hint, boost::unordered::detail::create_emplace_args( \
|
1023
|
+
BOOST_PP_ENUM_##z(n, BOOST_UNORDERED_CALL_FORWARD, a))); \
|
1024
|
+
}
|
881
1025
|
|
882
|
-
|
883
|
-
|
884
|
-
return this->emplace_hint(hint, boost::move(x));
|
885
|
-
}
|
1026
|
+
BOOST_PP_REPEAT_FROM_TO(
|
1027
|
+
4, BOOST_UNORDERED_EMPLACE_LIMIT, BOOST_UNORDERED_EMPLACE, _)
|
886
1028
|
|
887
|
-
|
1029
|
+
#undef BOOST_UNORDERED_EMPLACE
|
888
1030
|
|
889
|
-
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
890
|
-
void insert(std::initializer_list<value_type>);
|
891
1031
|
#endif
|
892
1032
|
|
893
|
-
|
894
|
-
size_type erase(const key_type&);
|
895
|
-
iterator erase(const_iterator, const_iterator);
|
896
|
-
void quick_erase(const_iterator it) { erase(it); }
|
897
|
-
void erase_return_void(const_iterator it) { erase(it); }
|
898
|
-
|
899
|
-
void clear();
|
900
|
-
void swap(unordered_multimap&);
|
1033
|
+
iterator insert(value_type const& x) { return this->emplace(x); }
|
901
1034
|
|
902
|
-
|
1035
|
+
iterator insert(BOOST_RV_REF(value_type) x)
|
1036
|
+
{
|
1037
|
+
return this->emplace(boost::move(x));
|
1038
|
+
}
|
903
1039
|
|
904
|
-
|
905
|
-
|
1040
|
+
iterator insert(const_iterator hint, value_type const& x)
|
1041
|
+
{
|
1042
|
+
return this->emplace_hint(hint, x);
|
1043
|
+
}
|
906
1044
|
|
907
|
-
|
1045
|
+
iterator insert(const_iterator hint, BOOST_RV_REF(value_type) x)
|
1046
|
+
{
|
1047
|
+
return this->emplace_hint(hint, boost::move(x));
|
1048
|
+
}
|
908
1049
|
|
909
|
-
|
910
|
-
const_iterator find(const key_type&) const;
|
1050
|
+
template <class InputIt> void insert(InputIt, InputIt);
|
911
1051
|
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
CompatibleKey const&,
|
916
|
-
CompatibleHash const&,
|
917
|
-
CompatiblePredicate const&);
|
1052
|
+
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1053
|
+
void insert(std::initializer_list<value_type>);
|
1054
|
+
#endif
|
918
1055
|
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
CompatibleHash const&,
|
924
|
-
CompatiblePredicate const&) const;
|
1056
|
+
iterator insert(BOOST_RV_REF(node_type) np)
|
1057
|
+
{
|
1058
|
+
return table_.move_insert_node_type(np);
|
1059
|
+
}
|
925
1060
|
|
926
|
-
|
1061
|
+
iterator insert(const_iterator hint, BOOST_RV_REF(node_type) np)
|
1062
|
+
{
|
1063
|
+
return table_.move_insert_node_type_with_hint(hint, np);
|
1064
|
+
}
|
927
1065
|
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
1066
|
+
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1067
|
+
private:
|
1068
|
+
// Note: Use r-value node_type to insert.
|
1069
|
+
iterator insert(node_type&);
|
1070
|
+
iterator insert(const_iterator, node_type& np);
|
932
1071
|
|
933
|
-
|
1072
|
+
public:
|
1073
|
+
#endif
|
934
1074
|
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
1075
|
+
iterator erase(const_iterator);
|
1076
|
+
size_type erase(const key_type&);
|
1077
|
+
iterator erase(const_iterator, const_iterator);
|
1078
|
+
void quick_erase(const_iterator it) { erase(it); }
|
1079
|
+
void erase_return_void(const_iterator it) { erase(it); }
|
939
1080
|
|
940
|
-
|
941
|
-
|
942
|
-
return table_.max_bucket_count();
|
943
|
-
}
|
1081
|
+
void clear();
|
1082
|
+
void swap(unordered_multimap&);
|
944
1083
|
|
945
|
-
|
1084
|
+
template <typename H2, typename P2>
|
1085
|
+
void merge(boost::unordered_multimap<K, T, H2, P2, A>& source);
|
946
1086
|
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
1087
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1088
|
+
template <typename H2, typename P2>
|
1089
|
+
void merge(boost::unordered_multimap<K, T, H2, P2, A>&& source);
|
1090
|
+
#endif
|
951
1091
|
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
table_.begin(n), n, table_.bucket_count_);
|
956
|
-
}
|
1092
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
1093
|
+
template <typename H2, typename P2>
|
1094
|
+
void merge(boost::unordered_map<K, T, H2, P2, A>& source);
|
957
1095
|
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
1096
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1097
|
+
template <typename H2, typename P2>
|
1098
|
+
void merge(boost::unordered_map<K, T, H2, P2, A>&& source);
|
1099
|
+
#endif
|
1100
|
+
#endif
|
963
1101
|
|
964
|
-
|
965
|
-
{
|
966
|
-
return local_iterator();
|
967
|
-
}
|
1102
|
+
// observers
|
968
1103
|
|
969
|
-
|
970
|
-
|
971
|
-
return const_local_iterator();
|
972
|
-
}
|
1104
|
+
hasher hash_function() const;
|
1105
|
+
key_equal key_eq() const;
|
973
1106
|
|
974
|
-
|
975
|
-
{
|
976
|
-
return const_local_iterator(
|
977
|
-
table_.begin(n), n, table_.bucket_count_);
|
978
|
-
}
|
1107
|
+
// lookup
|
979
1108
|
|
980
|
-
|
981
|
-
|
982
|
-
return const_local_iterator();
|
983
|
-
}
|
1109
|
+
iterator find(const key_type&);
|
1110
|
+
const_iterator find(const key_type&) const;
|
984
1111
|
|
985
|
-
|
1112
|
+
template <class CompatibleKey, class CompatibleHash,
|
1113
|
+
class CompatiblePredicate>
|
1114
|
+
iterator find(CompatibleKey const&, CompatibleHash const&,
|
1115
|
+
CompatiblePredicate const&);
|
986
1116
|
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
1117
|
+
template <class CompatibleKey, class CompatibleHash,
|
1118
|
+
class CompatiblePredicate>
|
1119
|
+
const_iterator find(CompatibleKey const&, CompatibleHash const&,
|
1120
|
+
CompatiblePredicate const&) const;
|
991
1121
|
|
992
|
-
|
993
|
-
void max_load_factor(float) BOOST_NOEXCEPT;
|
994
|
-
void rehash(size_type);
|
995
|
-
void reserve(size_type);
|
1122
|
+
size_type count(const key_type&) const;
|
996
1123
|
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
friend bool operator!=<K,T,H,P,A>(
|
1001
|
-
unordered_multimap const&, unordered_multimap const&);
|
1002
|
-
#endif
|
1003
|
-
}; // class template unordered_multimap
|
1124
|
+
std::pair<iterator, iterator> equal_range(const key_type&);
|
1125
|
+
std::pair<const_iterator, const_iterator> equal_range(
|
1126
|
+
const key_type&) const;
|
1004
1127
|
|
1005
|
-
|
1128
|
+
// bucket interface
|
1006
1129
|
|
1007
|
-
|
1008
|
-
unordered_map<K,T,H,P,A>::unordered_map(
|
1009
|
-
size_type n, const hasher &hf, const key_equal &eql,
|
1010
|
-
const allocator_type &a)
|
1011
|
-
: table_(n, hf, eql, a)
|
1130
|
+
size_type bucket_count() const BOOST_NOEXCEPT
|
1012
1131
|
{
|
1132
|
+
return table_.bucket_count_;
|
1013
1133
|
}
|
1014
1134
|
|
1015
|
-
|
1016
|
-
unordered_map<K,T,H,P,A>::unordered_map(allocator_type const& a)
|
1017
|
-
: table_(boost::unordered::detail::default_bucket_count,
|
1018
|
-
hasher(), key_equal(), a)
|
1135
|
+
size_type max_bucket_count() const BOOST_NOEXCEPT
|
1019
1136
|
{
|
1137
|
+
return table_.max_bucket_count();
|
1020
1138
|
}
|
1021
1139
|
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
: table_(other.table_, a)
|
1140
|
+
size_type bucket_size(size_type) const;
|
1141
|
+
|
1142
|
+
size_type bucket(const key_type& k) const
|
1026
1143
|
{
|
1144
|
+
return table_.hash_to_bucket(table_.hash(k));
|
1027
1145
|
}
|
1028
1146
|
|
1029
|
-
|
1030
|
-
template <class InputIt>
|
1031
|
-
unordered_map<K,T,H,P,A>::unordered_map(InputIt f, InputIt l)
|
1032
|
-
: table_(boost::unordered::detail::initial_size(f, l),
|
1033
|
-
hasher(), key_equal(), allocator_type())
|
1147
|
+
local_iterator begin(size_type n)
|
1034
1148
|
{
|
1035
|
-
table_.
|
1149
|
+
return local_iterator(table_.begin(n), n, table_.bucket_count_);
|
1036
1150
|
}
|
1037
1151
|
|
1038
|
-
|
1039
|
-
template <class InputIt>
|
1040
|
-
unordered_map<K,T,H,P,A>::unordered_map(
|
1041
|
-
InputIt f, InputIt l,
|
1042
|
-
size_type n,
|
1043
|
-
const hasher &hf,
|
1044
|
-
const key_equal &eql)
|
1045
|
-
: table_(boost::unordered::detail::initial_size(f, l, n),
|
1046
|
-
hf, eql, allocator_type())
|
1047
|
-
{
|
1048
|
-
table_.insert_range(f, l);
|
1049
|
-
}
|
1050
|
-
|
1051
|
-
template <class K, class T, class H, class P, class A>
|
1052
|
-
template <class InputIt>
|
1053
|
-
unordered_map<K,T,H,P,A>::unordered_map(
|
1054
|
-
InputIt f, InputIt l,
|
1055
|
-
size_type n,
|
1056
|
-
const hasher &hf,
|
1057
|
-
const key_equal &eql,
|
1058
|
-
const allocator_type &a)
|
1059
|
-
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
1152
|
+
const_local_iterator begin(size_type n) const
|
1060
1153
|
{
|
1061
|
-
table_.
|
1154
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
1062
1155
|
}
|
1063
|
-
|
1064
|
-
template <class K, class T, class H, class P, class A>
|
1065
|
-
unordered_map<K,T,H,P,A>::~unordered_map() BOOST_NOEXCEPT {}
|
1066
1156
|
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1157
|
+
local_iterator end(size_type) { return local_iterator(); }
|
1158
|
+
|
1159
|
+
const_local_iterator end(size_type) const { return const_local_iterator(); }
|
1160
|
+
|
1161
|
+
const_local_iterator cbegin(size_type n) const
|
1071
1162
|
{
|
1163
|
+
return const_local_iterator(table_.begin(n), n, table_.bucket_count_);
|
1072
1164
|
}
|
1073
1165
|
|
1074
|
-
|
1075
|
-
|
1076
|
-
template <class K, class T, class H, class P, class A>
|
1077
|
-
unordered_map<K,T,H,P,A>::unordered_map(
|
1078
|
-
unordered_map&& other, allocator_type const& a)
|
1079
|
-
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
1166
|
+
const_local_iterator cend(size_type) const
|
1080
1167
|
{
|
1168
|
+
return const_local_iterator();
|
1081
1169
|
}
|
1082
1170
|
|
1171
|
+
// hash policy
|
1172
|
+
|
1173
|
+
float max_load_factor() const BOOST_NOEXCEPT { return table_.mlf_; }
|
1174
|
+
|
1175
|
+
float load_factor() const BOOST_NOEXCEPT;
|
1176
|
+
void max_load_factor(float) BOOST_NOEXCEPT;
|
1177
|
+
void rehash(size_type);
|
1178
|
+
void reserve(size_type);
|
1179
|
+
|
1180
|
+
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
|
1181
|
+
friend bool operator==
|
1182
|
+
<K, T, H, P, A>(unordered_multimap const&, unordered_multimap const&);
|
1183
|
+
friend bool operator!=
|
1184
|
+
<K, T, H, P, A>(unordered_multimap const&, unordered_multimap const&);
|
1083
1185
|
#endif
|
1186
|
+
}; // class template unordered_multimap
|
1187
|
+
|
1188
|
+
////////////////////////////////////////////////////////////////////////////////
|
1189
|
+
|
1190
|
+
template <class K, class T, class H, class P, class A>
|
1191
|
+
unordered_map<K, T, H, P, A>::unordered_map()
|
1192
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
1193
|
+
key_equal(), allocator_type())
|
1194
|
+
{
|
1195
|
+
}
|
1196
|
+
|
1197
|
+
template <class K, class T, class H, class P, class A>
|
1198
|
+
unordered_map<K, T, H, P, A>::unordered_map(size_type n, const hasher& hf,
|
1199
|
+
const key_equal& eql, const allocator_type& a)
|
1200
|
+
: table_(n, hf, eql, a)
|
1201
|
+
{
|
1202
|
+
}
|
1203
|
+
|
1204
|
+
template <class K, class T, class H, class P, class A>
|
1205
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1206
|
+
size_type n, const allocator_type& a)
|
1207
|
+
: table_(n, hasher(), key_equal(), a)
|
1208
|
+
{
|
1209
|
+
}
|
1210
|
+
|
1211
|
+
template <class K, class T, class H, class P, class A>
|
1212
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1213
|
+
size_type n, const hasher& hf, const allocator_type& a)
|
1214
|
+
: table_(n, hf, key_equal(), a)
|
1215
|
+
{
|
1216
|
+
}
|
1217
|
+
|
1218
|
+
template <class K, class T, class H, class P, class A>
|
1219
|
+
unordered_map<K, T, H, P, A>::unordered_map(allocator_type const& a)
|
1220
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
1221
|
+
key_equal(), a)
|
1222
|
+
{
|
1223
|
+
}
|
1224
|
+
|
1225
|
+
template <class K, class T, class H, class P, class A>
|
1226
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1227
|
+
unordered_map const& other, allocator_type const& a)
|
1228
|
+
: table_(other.table_, a)
|
1229
|
+
{
|
1230
|
+
}
|
1231
|
+
|
1232
|
+
template <class K, class T, class H, class P, class A>
|
1233
|
+
template <class InputIt>
|
1234
|
+
unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l)
|
1235
|
+
: table_(boost::unordered::detail::initial_size(f, l), hasher(),
|
1236
|
+
key_equal(), allocator_type())
|
1237
|
+
{
|
1238
|
+
table_.insert_range(f, l);
|
1239
|
+
}
|
1240
|
+
|
1241
|
+
template <class K, class T, class H, class P, class A>
|
1242
|
+
template <class InputIt>
|
1243
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1244
|
+
InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
|
1245
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
|
1246
|
+
allocator_type())
|
1247
|
+
{
|
1248
|
+
table_.insert_range(f, l);
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
template <class K, class T, class H, class P, class A>
|
1252
|
+
template <class InputIt>
|
1253
|
+
unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l, size_type n,
|
1254
|
+
const hasher& hf, const key_equal& eql, const allocator_type& a)
|
1255
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
1256
|
+
{
|
1257
|
+
table_.insert_range(f, l);
|
1258
|
+
}
|
1259
|
+
|
1260
|
+
template <class K, class T, class H, class P, class A>
|
1261
|
+
template <class InputIt>
|
1262
|
+
unordered_map<K, T, H, P, A>::unordered_map(InputIt f, InputIt l, size_type n,
|
1263
|
+
const hasher& hf, const allocator_type& a)
|
1264
|
+
: table_(
|
1265
|
+
boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
|
1266
|
+
{
|
1267
|
+
table_.insert_range(f, l);
|
1268
|
+
}
|
1269
|
+
|
1270
|
+
template <class K, class T, class H, class P, class A>
|
1271
|
+
template <class InputIt>
|
1272
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1273
|
+
InputIt f, InputIt l, size_type n, const allocator_type& a)
|
1274
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
|
1275
|
+
key_equal(), a)
|
1276
|
+
{
|
1277
|
+
table_.insert_range(f, l);
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
template <class K, class T, class H, class P, class A>
|
1281
|
+
unordered_map<K, T, H, P, A>::~unordered_map() BOOST_NOEXCEPT
|
1282
|
+
{
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
template <class K, class T, class H, class P, class A>
|
1286
|
+
unordered_map<K, T, H, P, A>::unordered_map(unordered_map const& other)
|
1287
|
+
: table_(other.table_)
|
1288
|
+
{
|
1289
|
+
}
|
1290
|
+
|
1291
|
+
template <class K, class T, class H, class P, class A>
|
1292
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1293
|
+
BOOST_RV_REF(unordered_map) other, allocator_type const& a)
|
1294
|
+
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
1295
|
+
{
|
1296
|
+
}
|
1084
1297
|
|
1085
1298
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1086
1299
|
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1300
|
+
template <class K, class T, class H, class P, class A>
|
1301
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1302
|
+
std::initializer_list<value_type> list, size_type n, const hasher& hf,
|
1303
|
+
const key_equal& eql, const allocator_type& a)
|
1304
|
+
: table_(
|
1305
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1306
|
+
hf, eql, a)
|
1307
|
+
{
|
1308
|
+
table_.insert_range(list.begin(), list.end());
|
1309
|
+
}
|
1310
|
+
|
1311
|
+
template <class K, class T, class H, class P, class A>
|
1312
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1313
|
+
std::initializer_list<value_type> list, size_type n, const hasher& hf,
|
1314
|
+
const allocator_type& a)
|
1315
|
+
: table_(
|
1316
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1317
|
+
hf, key_equal(), a)
|
1318
|
+
{
|
1319
|
+
table_.insert_range(list.begin(), list.end());
|
1320
|
+
}
|
1321
|
+
|
1322
|
+
template <class K, class T, class H, class P, class A>
|
1323
|
+
unordered_map<K, T, H, P, A>::unordered_map(
|
1324
|
+
std::initializer_list<value_type> list, size_type n,
|
1325
|
+
const allocator_type& a)
|
1326
|
+
: table_(
|
1327
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1328
|
+
hasher(), key_equal(), a)
|
1329
|
+
{
|
1330
|
+
table_.insert_range(list.begin(), list.end());
|
1331
|
+
}
|
1098
1332
|
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1333
|
+
template <class K, class T, class H, class P, class A>
|
1334
|
+
unordered_map<K, T, H, P, A>& unordered_map<K, T, H, P, A>::operator=(
|
1335
|
+
std::initializer_list<value_type> list)
|
1336
|
+
{
|
1337
|
+
table_.clear();
|
1338
|
+
table_.insert_range(list.begin(), list.end());
|
1339
|
+
return *this;
|
1340
|
+
}
|
1107
1341
|
|
1108
1342
|
#endif
|
1109
1343
|
|
1110
|
-
|
1344
|
+
// size and capacity
|
1111
1345
|
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1346
|
+
template <class K, class T, class H, class P, class A>
|
1347
|
+
std::size_t unordered_map<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
1348
|
+
{
|
1349
|
+
return table_.max_size();
|
1350
|
+
}
|
1117
1351
|
|
1118
|
-
|
1352
|
+
// modifiers
|
1119
1353
|
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1354
|
+
template <class K, class T, class H, class P, class A>
|
1355
|
+
template <class InputIt>
|
1356
|
+
void unordered_map<K, T, H, P, A>::insert(InputIt first, InputIt last)
|
1357
|
+
{
|
1358
|
+
table_.insert_range(first, last);
|
1359
|
+
}
|
1126
1360
|
|
1127
1361
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1362
|
+
template <class K, class T, class H, class P, class A>
|
1363
|
+
void unordered_map<K, T, H, P, A>::insert(
|
1364
|
+
std::initializer_list<value_type> list)
|
1365
|
+
{
|
1366
|
+
table_.insert_range(list.begin(), list.end());
|
1367
|
+
}
|
1134
1368
|
#endif
|
1135
1369
|
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1370
|
+
template <class K, class T, class H, class P, class A>
|
1371
|
+
typename unordered_map<K, T, H, P, A>::iterator
|
1372
|
+
unordered_map<K, T, H, P, A>::erase(const_iterator position)
|
1373
|
+
{
|
1374
|
+
return table_.erase(position);
|
1375
|
+
}
|
1142
1376
|
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1377
|
+
template <class K, class T, class H, class P, class A>
|
1378
|
+
typename unordered_map<K, T, H, P, A>::size_type
|
1379
|
+
unordered_map<K, T, H, P, A>::erase(const key_type& k)
|
1380
|
+
{
|
1381
|
+
return table_.erase_key(k);
|
1382
|
+
}
|
1149
1383
|
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
}
|
1384
|
+
template <class K, class T, class H, class P, class A>
|
1385
|
+
typename unordered_map<K, T, H, P, A>::iterator
|
1386
|
+
unordered_map<K, T, H, P, A>::erase(const_iterator first, const_iterator last)
|
1387
|
+
{
|
1388
|
+
return table_.erase_range(first, last);
|
1389
|
+
}
|
1157
1390
|
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1391
|
+
template <class K, class T, class H, class P, class A>
|
1392
|
+
void unordered_map<K, T, H, P, A>::clear()
|
1393
|
+
{
|
1394
|
+
table_.clear();
|
1395
|
+
}
|
1163
1396
|
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1397
|
+
template <class K, class T, class H, class P, class A>
|
1398
|
+
void unordered_map<K, T, H, P, A>::swap(unordered_map& other)
|
1399
|
+
{
|
1400
|
+
table_.swap(other.table_);
|
1401
|
+
}
|
1169
1402
|
|
1170
|
-
|
1403
|
+
template <class K, class T, class H, class P, class A>
|
1404
|
+
template <typename H2, typename P2>
|
1405
|
+
void unordered_map<K, T, H, P, A>::merge(
|
1406
|
+
boost::unordered_map<K, T, H2, P2, A>& source)
|
1407
|
+
{
|
1408
|
+
table_.merge_impl(source.table_);
|
1409
|
+
}
|
1171
1410
|
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1411
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1412
|
+
template <class K, class T, class H, class P, class A>
|
1413
|
+
template <typename H2, typename P2>
|
1414
|
+
void unordered_map<K, T, H, P, A>::merge(
|
1415
|
+
boost::unordered_map<K, T, H2, P2, A>&& source)
|
1416
|
+
{
|
1417
|
+
table_.merge_impl(source.table_);
|
1418
|
+
}
|
1419
|
+
#endif
|
1178
1420
|
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1421
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
1422
|
+
template <class K, class T, class H, class P, class A>
|
1423
|
+
template <typename H2, typename P2>
|
1424
|
+
void unordered_map<K, T, H, P, A>::merge(
|
1425
|
+
boost::unordered_multimap<K, T, H2, P2, A>& source)
|
1426
|
+
{
|
1427
|
+
table_.merge_impl(source.table_);
|
1428
|
+
}
|
1185
1429
|
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1430
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1431
|
+
template <class K, class T, class H, class P, class A>
|
1432
|
+
template <typename H2, typename P2>
|
1433
|
+
void unordered_map<K, T, H, P, A>::merge(
|
1434
|
+
boost::unordered_multimap<K, T, H2, P2, A>&& source)
|
1435
|
+
{
|
1436
|
+
table_.merge_impl(source.table_);
|
1437
|
+
}
|
1438
|
+
#endif
|
1439
|
+
#endif
|
1192
1440
|
|
1193
|
-
|
1194
|
-
typename unordered_map<K,T,H,P,A>::mapped_type&
|
1195
|
-
unordered_map<K,T,H,P,A>::at(const key_type& k)
|
1196
|
-
{
|
1197
|
-
return table_.at(k).second;
|
1198
|
-
}
|
1441
|
+
// observers
|
1199
1442
|
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1443
|
+
template <class K, class T, class H, class P, class A>
|
1444
|
+
typename unordered_map<K, T, H, P, A>::hasher
|
1445
|
+
unordered_map<K, T, H, P, A>::hash_function() const
|
1446
|
+
{
|
1447
|
+
return table_.hash_function();
|
1448
|
+
}
|
1206
1449
|
|
1207
|
-
|
1450
|
+
template <class K, class T, class H, class P, class A>
|
1451
|
+
typename unordered_map<K, T, H, P, A>::key_equal
|
1452
|
+
unordered_map<K, T, H, P, A>::key_eq() const
|
1453
|
+
{
|
1454
|
+
return table_.key_eq();
|
1455
|
+
}
|
1208
1456
|
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1457
|
+
template <class K, class T, class H, class P, class A>
|
1458
|
+
typename unordered_map<K, T, H, P, A>::mapped_type&
|
1459
|
+
unordered_map<K, T, H, P, A>::operator[](const key_type& k)
|
1460
|
+
{
|
1461
|
+
return table_.try_emplace_impl(k).first->second;
|
1462
|
+
}
|
1215
1463
|
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1464
|
+
template <class K, class T, class H, class P, class A>
|
1465
|
+
typename unordered_map<K, T, H, P, A>::mapped_type&
|
1466
|
+
unordered_map<K, T, H, P, A>::at(const key_type& k)
|
1467
|
+
{
|
1468
|
+
return table_.at(k).second;
|
1469
|
+
}
|
1222
1470
|
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
CompatibleHash const& hash,
|
1230
|
-
CompatiblePredicate const& eq)
|
1231
|
-
{
|
1232
|
-
return table_.generic_find_node(k, hash, eq);
|
1233
|
-
}
|
1471
|
+
template <class K, class T, class H, class P, class A>
|
1472
|
+
typename unordered_map<K, T, H, P, A>::mapped_type const&
|
1473
|
+
unordered_map<K, T, H, P, A>::at(const key_type& k) const
|
1474
|
+
{
|
1475
|
+
return table_.at(k).second;
|
1476
|
+
}
|
1234
1477
|
|
1235
|
-
|
1236
|
-
template <class CompatibleKey, class CompatibleHash,
|
1237
|
-
class CompatiblePredicate>
|
1238
|
-
typename unordered_map<K,T,H,P,A>::const_iterator
|
1239
|
-
unordered_map<K,T,H,P,A>::find(
|
1240
|
-
CompatibleKey const& k,
|
1241
|
-
CompatibleHash const& hash,
|
1242
|
-
CompatiblePredicate const& eq) const
|
1243
|
-
{
|
1244
|
-
return table_.generic_find_node(k, hash, eq);
|
1245
|
-
}
|
1478
|
+
// lookup
|
1246
1479
|
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1480
|
+
template <class K, class T, class H, class P, class A>
|
1481
|
+
typename unordered_map<K, T, H, P, A>::iterator
|
1482
|
+
unordered_map<K, T, H, P, A>::find(const key_type& k)
|
1483
|
+
{
|
1484
|
+
return iterator(table_.find_node(k));
|
1485
|
+
}
|
1253
1486
|
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1487
|
+
template <class K, class T, class H, class P, class A>
|
1488
|
+
typename unordered_map<K, T, H, P, A>::const_iterator
|
1489
|
+
unordered_map<K, T, H, P, A>::find(const key_type& k) const
|
1490
|
+
{
|
1491
|
+
return const_iterator(table_.find_node(k));
|
1492
|
+
}
|
1493
|
+
|
1494
|
+
template <class K, class T, class H, class P, class A>
|
1495
|
+
template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
|
1496
|
+
typename unordered_map<K, T, H, P, A>::iterator
|
1497
|
+
unordered_map<K, T, H, P, A>::find(CompatibleKey const& k,
|
1498
|
+
CompatibleHash const& hash, CompatiblePredicate const& eq)
|
1499
|
+
{
|
1500
|
+
return iterator(table_.generic_find_node(k, hash, eq));
|
1501
|
+
}
|
1502
|
+
|
1503
|
+
template <class K, class T, class H, class P, class A>
|
1504
|
+
template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
|
1505
|
+
typename unordered_map<K, T, H, P, A>::const_iterator
|
1506
|
+
unordered_map<K, T, H, P, A>::find(CompatibleKey const& k,
|
1507
|
+
CompatibleHash const& hash, CompatiblePredicate const& eq) const
|
1508
|
+
{
|
1509
|
+
return const_iterator(table_.generic_find_node(k, hash, eq));
|
1510
|
+
}
|
1262
1511
|
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
return table_.equal_range(k);
|
1270
|
-
}
|
1512
|
+
template <class K, class T, class H, class P, class A>
|
1513
|
+
typename unordered_map<K, T, H, P, A>::size_type
|
1514
|
+
unordered_map<K, T, H, P, A>::count(const key_type& k) const
|
1515
|
+
{
|
1516
|
+
return table_.count(k);
|
1517
|
+
}
|
1271
1518
|
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1519
|
+
template <class K, class T, class H, class P, class A>
|
1520
|
+
std::pair<typename unordered_map<K, T, H, P, A>::iterator,
|
1521
|
+
typename unordered_map<K, T, H, P, A>::iterator>
|
1522
|
+
unordered_map<K, T, H, P, A>::equal_range(const key_type& k)
|
1523
|
+
{
|
1524
|
+
return table_.equal_range(k);
|
1525
|
+
}
|
1278
1526
|
|
1279
|
-
|
1527
|
+
template <class K, class T, class H, class P, class A>
|
1528
|
+
std::pair<typename unordered_map<K, T, H, P, A>::const_iterator,
|
1529
|
+
typename unordered_map<K, T, H, P, A>::const_iterator>
|
1530
|
+
unordered_map<K, T, H, P, A>::equal_range(const key_type& k) const
|
1531
|
+
{
|
1532
|
+
return table_.equal_range(k);
|
1533
|
+
}
|
1280
1534
|
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1535
|
+
template <class K, class T, class H, class P, class A>
|
1536
|
+
typename unordered_map<K, T, H, P, A>::size_type
|
1537
|
+
unordered_map<K, T, H, P, A>::bucket_size(size_type n) const
|
1538
|
+
{
|
1539
|
+
return table_.bucket_size(n);
|
1540
|
+
}
|
1286
1541
|
|
1287
|
-
|
1288
|
-
void unordered_map<K,T,H,P,A>::max_load_factor(float m) BOOST_NOEXCEPT
|
1289
|
-
{
|
1290
|
-
table_.max_load_factor(m);
|
1291
|
-
}
|
1542
|
+
// hash policy
|
1292
1543
|
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1544
|
+
template <class K, class T, class H, class P, class A>
|
1545
|
+
float unordered_map<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
|
1546
|
+
{
|
1547
|
+
return table_.load_factor();
|
1548
|
+
}
|
1298
1549
|
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1550
|
+
template <class K, class T, class H, class P, class A>
|
1551
|
+
void unordered_map<K, T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
|
1552
|
+
{
|
1553
|
+
table_.max_load_factor(m);
|
1554
|
+
}
|
1304
1555
|
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1556
|
+
template <class K, class T, class H, class P, class A>
|
1557
|
+
void unordered_map<K, T, H, P, A>::rehash(size_type n)
|
1558
|
+
{
|
1559
|
+
table_.rehash(n);
|
1560
|
+
}
|
1561
|
+
|
1562
|
+
template <class K, class T, class H, class P, class A>
|
1563
|
+
void unordered_map<K, T, H, P, A>::reserve(size_type n)
|
1564
|
+
{
|
1565
|
+
table_.reserve(n);
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
template <class K, class T, class H, class P, class A>
|
1569
|
+
inline bool operator==(unordered_map<K, T, H, P, A> const& m1,
|
1570
|
+
unordered_map<K, T, H, P, A> const& m2)
|
1571
|
+
{
|
1310
1572
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1311
|
-
|
1573
|
+
struct dummy
|
1574
|
+
{
|
1575
|
+
unordered_map<K, T, H, P, A> x;
|
1576
|
+
};
|
1312
1577
|
#endif
|
1313
|
-
|
1314
|
-
|
1578
|
+
return m1.table_.equals(m2.table_);
|
1579
|
+
}
|
1315
1580
|
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
{
|
1581
|
+
template <class K, class T, class H, class P, class A>
|
1582
|
+
inline bool operator!=(unordered_map<K, T, H, P, A> const& m1,
|
1583
|
+
unordered_map<K, T, H, P, A> const& m2)
|
1584
|
+
{
|
1321
1585
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1322
|
-
|
1586
|
+
struct dummy
|
1587
|
+
{
|
1588
|
+
unordered_map<K, T, H, P, A> x;
|
1589
|
+
};
|
1323
1590
|
#endif
|
1324
|
-
|
1325
|
-
|
1591
|
+
return !m1.table_.equals(m2.table_);
|
1592
|
+
}
|
1326
1593
|
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
{
|
1594
|
+
template <class K, class T, class H, class P, class A>
|
1595
|
+
inline void swap(
|
1596
|
+
unordered_map<K, T, H, P, A>& m1, unordered_map<K, T, H, P, A>& m2)
|
1597
|
+
{
|
1332
1598
|
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1333
|
-
|
1599
|
+
struct dummy
|
1600
|
+
{
|
1601
|
+
unordered_map<K, T, H, P, A> x;
|
1602
|
+
};
|
1334
1603
|
#endif
|
1335
|
-
|
1336
|
-
|
1604
|
+
m1.swap(m2);
|
1605
|
+
}
|
1337
1606
|
|
1338
1607
|
////////////////////////////////////////////////////////////////////////////////
|
1339
1608
|
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
}
|
1609
|
+
template <class K, class T, class H, class P, class A>
|
1610
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap()
|
1611
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
1612
|
+
key_equal(), allocator_type())
|
1613
|
+
{
|
1614
|
+
}
|
1347
1615
|
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1616
|
+
template <class K, class T, class H, class P, class A>
|
1617
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(size_type n,
|
1618
|
+
const hasher& hf, const key_equal& eql, const allocator_type& a)
|
1619
|
+
: table_(n, hf, eql, a)
|
1620
|
+
{
|
1621
|
+
}
|
1354
1622
|
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1623
|
+
template <class K, class T, class H, class P, class A>
|
1624
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1625
|
+
size_type n, const allocator_type& a)
|
1626
|
+
: table_(n, hasher(), key_equal(), a)
|
1627
|
+
{
|
1628
|
+
}
|
1361
1629
|
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
table_.insert_range(f, l);
|
1369
|
-
}
|
1630
|
+
template <class K, class T, class H, class P, class A>
|
1631
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1632
|
+
size_type n, const hasher& hf, const allocator_type& a)
|
1633
|
+
: table_(n, hf, key_equal(), a)
|
1634
|
+
{
|
1635
|
+
}
|
1370
1636
|
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
const key_equal &eql)
|
1378
|
-
: table_(boost::unordered::detail::initial_size(f, l, n),
|
1379
|
-
hf, eql, allocator_type())
|
1380
|
-
{
|
1381
|
-
table_.insert_range(f, l);
|
1382
|
-
}
|
1383
|
-
|
1384
|
-
template <class K, class T, class H, class P, class A>
|
1385
|
-
template <class InputIt>
|
1386
|
-
unordered_multimap<K,T,H,P,A>::unordered_multimap(
|
1387
|
-
InputIt f, InputIt l,
|
1388
|
-
size_type n,
|
1389
|
-
const hasher &hf,
|
1390
|
-
const key_equal &eql,
|
1391
|
-
const allocator_type &a)
|
1392
|
-
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
1393
|
-
{
|
1394
|
-
table_.insert_range(f, l);
|
1395
|
-
}
|
1396
|
-
|
1397
|
-
template <class K, class T, class H, class P, class A>
|
1398
|
-
unordered_multimap<K,T,H,P,A>::~unordered_multimap() BOOST_NOEXCEPT {}
|
1637
|
+
template <class K, class T, class H, class P, class A>
|
1638
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(allocator_type const& a)
|
1639
|
+
: table_(boost::unordered::detail::default_bucket_count, hasher(),
|
1640
|
+
key_equal(), a)
|
1641
|
+
{
|
1642
|
+
}
|
1399
1643
|
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1644
|
+
template <class K, class T, class H, class P, class A>
|
1645
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1646
|
+
unordered_multimap const& other, allocator_type const& a)
|
1647
|
+
: table_(other.table_, a)
|
1648
|
+
{
|
1649
|
+
}
|
1406
1650
|
|
1407
|
-
|
1651
|
+
template <class K, class T, class H, class P, class A>
|
1652
|
+
template <class InputIt>
|
1653
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l)
|
1654
|
+
: table_(boost::unordered::detail::initial_size(f, l), hasher(),
|
1655
|
+
key_equal(), allocator_type())
|
1656
|
+
{
|
1657
|
+
table_.insert_range(f, l);
|
1658
|
+
}
|
1659
|
+
|
1660
|
+
template <class K, class T, class H, class P, class A>
|
1661
|
+
template <class InputIt>
|
1662
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1663
|
+
InputIt f, InputIt l, size_type n, const hasher& hf, const key_equal& eql)
|
1664
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql,
|
1665
|
+
allocator_type())
|
1666
|
+
{
|
1667
|
+
table_.insert_range(f, l);
|
1668
|
+
}
|
1669
|
+
|
1670
|
+
template <class K, class T, class H, class P, class A>
|
1671
|
+
template <class InputIt>
|
1672
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l,
|
1673
|
+
size_type n, const hasher& hf, const key_equal& eql,
|
1674
|
+
const allocator_type& a)
|
1675
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hf, eql, a)
|
1676
|
+
{
|
1677
|
+
table_.insert_range(f, l);
|
1678
|
+
}
|
1679
|
+
|
1680
|
+
template <class K, class T, class H, class P, class A>
|
1681
|
+
template <class InputIt>
|
1682
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(InputIt f, InputIt l,
|
1683
|
+
size_type n, const hasher& hf, const allocator_type& a)
|
1684
|
+
: table_(
|
1685
|
+
boost::unordered::detail::initial_size(f, l, n), hf, key_equal(), a)
|
1686
|
+
{
|
1687
|
+
table_.insert_range(f, l);
|
1688
|
+
}
|
1689
|
+
|
1690
|
+
template <class K, class T, class H, class P, class A>
|
1691
|
+
template <class InputIt>
|
1692
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1693
|
+
InputIt f, InputIt l, size_type n, const allocator_type& a)
|
1694
|
+
: table_(boost::unordered::detail::initial_size(f, l, n), hasher(),
|
1695
|
+
key_equal(), a)
|
1696
|
+
{
|
1697
|
+
table_.insert_range(f, l);
|
1698
|
+
}
|
1408
1699
|
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
{
|
1414
|
-
}
|
1700
|
+
template <class K, class T, class H, class P, class A>
|
1701
|
+
unordered_multimap<K, T, H, P, A>::~unordered_multimap() BOOST_NOEXCEPT
|
1702
|
+
{
|
1703
|
+
}
|
1415
1704
|
|
1416
|
-
|
1705
|
+
template <class K, class T, class H, class P, class A>
|
1706
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1707
|
+
unordered_multimap const& other)
|
1708
|
+
: table_(other.table_)
|
1709
|
+
{
|
1710
|
+
}
|
1711
|
+
|
1712
|
+
template <class K, class T, class H, class P, class A>
|
1713
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1714
|
+
BOOST_RV_REF(unordered_multimap) other, allocator_type const& a)
|
1715
|
+
: table_(other.table_, a, boost::unordered::detail::move_tag())
|
1716
|
+
{
|
1717
|
+
}
|
1417
1718
|
|
1418
1719
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1419
1720
|
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1721
|
+
template <class K, class T, class H, class P, class A>
|
1722
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1723
|
+
std::initializer_list<value_type> list, size_type n, const hasher& hf,
|
1724
|
+
const key_equal& eql, const allocator_type& a)
|
1725
|
+
: table_(
|
1726
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1727
|
+
hf, eql, a)
|
1728
|
+
{
|
1729
|
+
table_.insert_range(list.begin(), list.end());
|
1730
|
+
}
|
1731
|
+
|
1732
|
+
template <class K, class T, class H, class P, class A>
|
1733
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1734
|
+
std::initializer_list<value_type> list, size_type n, const hasher& hf,
|
1735
|
+
const allocator_type& a)
|
1736
|
+
: table_(
|
1737
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1738
|
+
hf, key_equal(), a)
|
1739
|
+
{
|
1740
|
+
table_.insert_range(list.begin(), list.end());
|
1741
|
+
}
|
1742
|
+
|
1743
|
+
template <class K, class T, class H, class P, class A>
|
1744
|
+
unordered_multimap<K, T, H, P, A>::unordered_multimap(
|
1745
|
+
std::initializer_list<value_type> list, size_type n,
|
1746
|
+
const allocator_type& a)
|
1747
|
+
: table_(
|
1748
|
+
boost::unordered::detail::initial_size(list.begin(), list.end(), n),
|
1749
|
+
hasher(), key_equal(), a)
|
1750
|
+
{
|
1751
|
+
table_.insert_range(list.begin(), list.end());
|
1752
|
+
}
|
1431
1753
|
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1754
|
+
template <class K, class T, class H, class P, class A>
|
1755
|
+
unordered_multimap<K, T, H, P, A>& unordered_multimap<K, T, H, P, A>::operator=(
|
1756
|
+
std::initializer_list<value_type> list)
|
1757
|
+
{
|
1758
|
+
table_.clear();
|
1759
|
+
table_.insert_range(list.begin(), list.end());
|
1760
|
+
return *this;
|
1761
|
+
}
|
1440
1762
|
|
1441
1763
|
#endif
|
1442
1764
|
|
1443
|
-
|
1765
|
+
// size and capacity
|
1444
1766
|
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1767
|
+
template <class K, class T, class H, class P, class A>
|
1768
|
+
std::size_t unordered_multimap<K, T, H, P, A>::max_size() const BOOST_NOEXCEPT
|
1769
|
+
{
|
1770
|
+
return table_.max_size();
|
1771
|
+
}
|
1450
1772
|
|
1451
|
-
|
1773
|
+
// modifiers
|
1452
1774
|
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1775
|
+
template <class K, class T, class H, class P, class A>
|
1776
|
+
template <class InputIt>
|
1777
|
+
void unordered_multimap<K, T, H, P, A>::insert(InputIt first, InputIt last)
|
1778
|
+
{
|
1779
|
+
table_.insert_range(first, last);
|
1780
|
+
}
|
1459
1781
|
|
1460
1782
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1783
|
+
template <class K, class T, class H, class P, class A>
|
1784
|
+
void unordered_multimap<K, T, H, P, A>::insert(
|
1785
|
+
std::initializer_list<value_type> list)
|
1786
|
+
{
|
1787
|
+
table_.insert_range(list.begin(), list.end());
|
1788
|
+
}
|
1467
1789
|
#endif
|
1468
1790
|
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1791
|
+
template <class K, class T, class H, class P, class A>
|
1792
|
+
typename unordered_multimap<K, T, H, P, A>::iterator
|
1793
|
+
unordered_multimap<K, T, H, P, A>::erase(const_iterator position)
|
1794
|
+
{
|
1795
|
+
return table_.erase(position);
|
1796
|
+
}
|
1475
1797
|
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1798
|
+
template <class K, class T, class H, class P, class A>
|
1799
|
+
typename unordered_multimap<K, T, H, P, A>::size_type
|
1800
|
+
unordered_multimap<K, T, H, P, A>::erase(const key_type& k)
|
1801
|
+
{
|
1802
|
+
return table_.erase_key(k);
|
1803
|
+
}
|
1804
|
+
|
1805
|
+
template <class K, class T, class H, class P, class A>
|
1806
|
+
typename unordered_multimap<K, T, H, P, A>::iterator
|
1807
|
+
unordered_multimap<K, T, H, P, A>::erase(
|
1808
|
+
const_iterator first, const_iterator last)
|
1809
|
+
{
|
1810
|
+
return table_.erase_range(first, last);
|
1811
|
+
}
|
1812
|
+
|
1813
|
+
template <class K, class T, class H, class P, class A>
|
1814
|
+
void unordered_multimap<K, T, H, P, A>::clear()
|
1815
|
+
{
|
1816
|
+
table_.clear();
|
1817
|
+
}
|
1818
|
+
|
1819
|
+
template <class K, class T, class H, class P, class A>
|
1820
|
+
void unordered_multimap<K, T, H, P, A>::swap(unordered_multimap& other)
|
1821
|
+
{
|
1822
|
+
table_.swap(other.table_);
|
1823
|
+
}
|
1824
|
+
|
1825
|
+
// observers
|
1826
|
+
|
1827
|
+
template <class K, class T, class H, class P, class A>
|
1828
|
+
typename unordered_multimap<K, T, H, P, A>::hasher
|
1829
|
+
unordered_multimap<K, T, H, P, A>::hash_function() const
|
1830
|
+
{
|
1831
|
+
return table_.hash_function();
|
1832
|
+
}
|
1833
|
+
|
1834
|
+
template <class K, class T, class H, class P, class A>
|
1835
|
+
typename unordered_multimap<K, T, H, P, A>::key_equal
|
1836
|
+
unordered_multimap<K, T, H, P, A>::key_eq() const
|
1837
|
+
{
|
1838
|
+
return table_.key_eq();
|
1839
|
+
}
|
1840
|
+
|
1841
|
+
template <class K, class T, class H, class P, class A>
|
1842
|
+
template <typename H2, typename P2>
|
1843
|
+
void unordered_multimap<K, T, H, P, A>::merge(
|
1844
|
+
boost::unordered_multimap<K, T, H2, P2, A>& source)
|
1845
|
+
{
|
1846
|
+
while (!source.empty()) {
|
1847
|
+
insert(source.extract(source.begin()));
|
1481
1848
|
}
|
1849
|
+
}
|
1482
1850
|
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1851
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1852
|
+
template <class K, class T, class H, class P, class A>
|
1853
|
+
template <typename H2, typename P2>
|
1854
|
+
void unordered_multimap<K, T, H, P, A>::merge(
|
1855
|
+
boost::unordered_multimap<K, T, H2, P2, A>&& source)
|
1856
|
+
{
|
1857
|
+
while (!source.empty()) {
|
1858
|
+
insert(source.extract(source.begin()));
|
1489
1859
|
}
|
1860
|
+
}
|
1861
|
+
#endif
|
1490
1862
|
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1863
|
+
#if BOOST_UNORDERED_INTEROPERABLE_NODES
|
1864
|
+
template <class K, class T, class H, class P, class A>
|
1865
|
+
template <typename H2, typename P2>
|
1866
|
+
void unordered_multimap<K, T, H, P, A>::merge(
|
1867
|
+
boost::unordered_map<K, T, H2, P2, A>& source)
|
1868
|
+
{
|
1869
|
+
while (!source.empty()) {
|
1870
|
+
insert(source.extract(source.begin()));
|
1495
1871
|
}
|
1872
|
+
}
|
1496
1873
|
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1874
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
1875
|
+
template <class K, class T, class H, class P, class A>
|
1876
|
+
template <typename H2, typename P2>
|
1877
|
+
void unordered_multimap<K, T, H, P, A>::merge(
|
1878
|
+
boost::unordered_map<K, T, H2, P2, A>&& source)
|
1879
|
+
{
|
1880
|
+
while (!source.empty()) {
|
1881
|
+
insert(source.extract(source.begin()));
|
1501
1882
|
}
|
1883
|
+
}
|
1884
|
+
#endif
|
1885
|
+
#endif
|
1502
1886
|
|
1503
|
-
|
1887
|
+
// lookup
|
1504
1888
|
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1889
|
+
template <class K, class T, class H, class P, class A>
|
1890
|
+
typename unordered_multimap<K, T, H, P, A>::iterator
|
1891
|
+
unordered_multimap<K, T, H, P, A>::find(const key_type& k)
|
1892
|
+
{
|
1893
|
+
return iterator(table_.find_node(k));
|
1894
|
+
}
|
1511
1895
|
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1896
|
+
template <class K, class T, class H, class P, class A>
|
1897
|
+
typename unordered_multimap<K, T, H, P, A>::const_iterator
|
1898
|
+
unordered_multimap<K, T, H, P, A>::find(const key_type& k) const
|
1899
|
+
{
|
1900
|
+
return const_iterator(table_.find_node(k));
|
1901
|
+
}
|
1902
|
+
|
1903
|
+
template <class K, class T, class H, class P, class A>
|
1904
|
+
template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
|
1905
|
+
typename unordered_multimap<K, T, H, P, A>::iterator
|
1906
|
+
unordered_multimap<K, T, H, P, A>::find(CompatibleKey const& k,
|
1907
|
+
CompatibleHash const& hash, CompatiblePredicate const& eq)
|
1908
|
+
{
|
1909
|
+
return iterator(table_.generic_find_node(k, hash, eq));
|
1910
|
+
}
|
1911
|
+
|
1912
|
+
template <class K, class T, class H, class P, class A>
|
1913
|
+
template <class CompatibleKey, class CompatibleHash, class CompatiblePredicate>
|
1914
|
+
typename unordered_multimap<K, T, H, P, A>::const_iterator
|
1915
|
+
unordered_multimap<K, T, H, P, A>::find(CompatibleKey const& k,
|
1916
|
+
CompatibleHash const& hash, CompatiblePredicate const& eq) const
|
1917
|
+
{
|
1918
|
+
return const_iterator(table_.generic_find_node(k, hash, eq));
|
1919
|
+
}
|
1518
1920
|
|
1519
|
-
|
1921
|
+
template <class K, class T, class H, class P, class A>
|
1922
|
+
typename unordered_multimap<K, T, H, P, A>::size_type
|
1923
|
+
unordered_multimap<K, T, H, P, A>::count(const key_type& k) const
|
1924
|
+
{
|
1925
|
+
return table_.count(k);
|
1926
|
+
}
|
1520
1927
|
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1928
|
+
template <class K, class T, class H, class P, class A>
|
1929
|
+
std::pair<typename unordered_multimap<K, T, H, P, A>::iterator,
|
1930
|
+
typename unordered_multimap<K, T, H, P, A>::iterator>
|
1931
|
+
unordered_multimap<K, T, H, P, A>::equal_range(const key_type& k)
|
1932
|
+
{
|
1933
|
+
return table_.equal_range(k);
|
1934
|
+
}
|
1935
|
+
|
1936
|
+
template <class K, class T, class H, class P, class A>
|
1937
|
+
std::pair<typename unordered_multimap<K, T, H, P, A>::const_iterator,
|
1938
|
+
typename unordered_multimap<K, T, H, P, A>::const_iterator>
|
1939
|
+
unordered_multimap<K, T, H, P, A>::equal_range(const key_type& k) const
|
1940
|
+
{
|
1941
|
+
return table_.equal_range(k);
|
1942
|
+
}
|
1943
|
+
|
1944
|
+
template <class K, class T, class H, class P, class A>
|
1945
|
+
typename unordered_multimap<K, T, H, P, A>::size_type
|
1946
|
+
unordered_multimap<K, T, H, P, A>::bucket_size(size_type n) const
|
1947
|
+
{
|
1948
|
+
return table_.bucket_size(n);
|
1949
|
+
}
|
1950
|
+
|
1951
|
+
// hash policy
|
1952
|
+
|
1953
|
+
template <class K, class T, class H, class P, class A>
|
1954
|
+
float unordered_multimap<K, T, H, P, A>::load_factor() const BOOST_NOEXCEPT
|
1955
|
+
{
|
1956
|
+
return table_.load_factor();
|
1957
|
+
}
|
1958
|
+
|
1959
|
+
template <class K, class T, class H, class P, class A>
|
1960
|
+
void unordered_multimap<K, T, H, P, A>::max_load_factor(float m) BOOST_NOEXCEPT
|
1961
|
+
{
|
1962
|
+
table_.max_load_factor(m);
|
1963
|
+
}
|
1964
|
+
|
1965
|
+
template <class K, class T, class H, class P, class A>
|
1966
|
+
void unordered_multimap<K, T, H, P, A>::rehash(size_type n)
|
1967
|
+
{
|
1968
|
+
table_.rehash(n);
|
1969
|
+
}
|
1970
|
+
|
1971
|
+
template <class K, class T, class H, class P, class A>
|
1972
|
+
void unordered_multimap<K, T, H, P, A>::reserve(size_type n)
|
1973
|
+
{
|
1974
|
+
table_.reserve(n);
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
template <class K, class T, class H, class P, class A>
|
1978
|
+
inline bool operator==(unordered_multimap<K, T, H, P, A> const& m1,
|
1979
|
+
unordered_multimap<K, T, H, P, A> const& m2)
|
1980
|
+
{
|
1981
|
+
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1982
|
+
struct dummy
|
1524
1983
|
{
|
1525
|
-
|
1526
|
-
}
|
1984
|
+
unordered_multimap<K, T, H, P, A> x;
|
1985
|
+
};
|
1986
|
+
#endif
|
1987
|
+
return m1.table_.equals(m2.table_);
|
1988
|
+
}
|
1527
1989
|
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1990
|
+
template <class K, class T, class H, class P, class A>
|
1991
|
+
inline bool operator!=(unordered_multimap<K, T, H, P, A> const& m1,
|
1992
|
+
unordered_multimap<K, T, H, P, A> const& m2)
|
1993
|
+
{
|
1994
|
+
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1995
|
+
struct dummy
|
1531
1996
|
{
|
1532
|
-
|
1533
|
-
}
|
1997
|
+
unordered_multimap<K, T, H, P, A> x;
|
1998
|
+
};
|
1999
|
+
#endif
|
2000
|
+
return !m1.table_.equals(m2.table_);
|
2001
|
+
}
|
1534
2002
|
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
CompatibleHash const& hash,
|
1542
|
-
CompatiblePredicate const& eq)
|
2003
|
+
template <class K, class T, class H, class P, class A>
|
2004
|
+
inline void swap(unordered_multimap<K, T, H, P, A>& m1,
|
2005
|
+
unordered_multimap<K, T, H, P, A>& m2)
|
2006
|
+
{
|
2007
|
+
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
2008
|
+
struct dummy
|
1543
2009
|
{
|
1544
|
-
|
1545
|
-
}
|
2010
|
+
unordered_multimap<K, T, H, P, A> x;
|
2011
|
+
};
|
2012
|
+
#endif
|
2013
|
+
m1.swap(m2);
|
2014
|
+
}
|
1546
2015
|
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
2016
|
+
template <typename N, class K, class T, class A> class node_handle_map
|
2017
|
+
{
|
2018
|
+
BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle_map)
|
2019
|
+
|
2020
|
+
template <typename Types>
|
2021
|
+
friend struct ::boost::unordered::detail::table_impl;
|
2022
|
+
template <typename Types>
|
2023
|
+
friend struct ::boost::unordered::detail::grouped_table_impl;
|
2024
|
+
|
2025
|
+
typedef typename boost::unordered::detail::rebind_wrap<A,
|
2026
|
+
std::pair<K const, T> >::type value_allocator;
|
2027
|
+
typedef boost::unordered::detail::allocator_traits<value_allocator>
|
2028
|
+
value_allocator_traits;
|
2029
|
+
typedef N node;
|
2030
|
+
typedef typename boost::unordered::detail::rebind_wrap<A, node>::type
|
2031
|
+
node_allocator;
|
2032
|
+
typedef boost::unordered::detail::allocator_traits<node_allocator>
|
2033
|
+
node_allocator_traits;
|
2034
|
+
typedef typename node_allocator_traits::pointer node_pointer;
|
2035
|
+
|
2036
|
+
public:
|
2037
|
+
typedef K key_type;
|
2038
|
+
typedef T mapped_type;
|
2039
|
+
typedef A allocator_type;
|
2040
|
+
|
2041
|
+
private:
|
2042
|
+
node_pointer ptr_;
|
2043
|
+
bool has_alloc_;
|
2044
|
+
boost::unordered::detail::value_base<value_allocator> alloc_;
|
2045
|
+
|
2046
|
+
public:
|
2047
|
+
BOOST_CONSTEXPR node_handle_map() BOOST_NOEXCEPT : ptr_(), has_alloc_(false)
|
1555
2048
|
{
|
1556
|
-
return table_.generic_find_node(k, hash, eq);
|
1557
2049
|
}
|
1558
2050
|
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
2051
|
+
/*BOOST_CONSTEXPR */ node_handle_map(
|
2052
|
+
node_pointer ptr, allocator_type const& a)
|
2053
|
+
: ptr_(ptr), has_alloc_(false)
|
1562
2054
|
{
|
1563
|
-
|
2055
|
+
if (ptr_) {
|
2056
|
+
new ((void*)&alloc_) value_allocator(a);
|
2057
|
+
has_alloc_ = true;
|
2058
|
+
}
|
1564
2059
|
}
|
1565
2060
|
|
1566
|
-
|
1567
|
-
std::pair<
|
1568
|
-
typename unordered_multimap<K,T,H,P,A>::iterator,
|
1569
|
-
typename unordered_multimap<K,T,H,P,A>::iterator>
|
1570
|
-
unordered_multimap<K,T,H,P,A>::equal_range(const key_type& k)
|
2061
|
+
~node_handle_map()
|
1571
2062
|
{
|
1572
|
-
|
2063
|
+
if (has_alloc_ && ptr_) {
|
2064
|
+
node_allocator node_alloc(alloc_.value());
|
2065
|
+
boost::unordered::detail::node_tmp<node_allocator> tmp(
|
2066
|
+
ptr_, node_alloc);
|
2067
|
+
}
|
2068
|
+
if (has_alloc_) {
|
2069
|
+
alloc_.value_ptr()->~value_allocator();
|
2070
|
+
}
|
1573
2071
|
}
|
1574
2072
|
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
typename unordered_multimap<K,T,H,P,A>::const_iterator>
|
1579
|
-
unordered_multimap<K,T,H,P,A>::equal_range(const key_type& k) const
|
2073
|
+
node_handle_map(BOOST_RV_REF(node_handle_map) n) BOOST_NOEXCEPT
|
2074
|
+
: ptr_(n.ptr_),
|
2075
|
+
has_alloc_(false)
|
1580
2076
|
{
|
1581
|
-
|
2077
|
+
if (n.has_alloc_) {
|
2078
|
+
new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
|
2079
|
+
has_alloc_ = true;
|
2080
|
+
n.ptr_ = node_pointer();
|
2081
|
+
n.alloc_.value_ptr()->~value_allocator();
|
2082
|
+
n.has_alloc_ = false;
|
2083
|
+
}
|
1582
2084
|
}
|
1583
2085
|
|
1584
|
-
|
1585
|
-
typename unordered_multimap<K,T,H,P,A>::size_type
|
1586
|
-
unordered_multimap<K,T,H,P,A>::bucket_size(size_type n) const
|
2086
|
+
node_handle_map& operator=(BOOST_RV_REF(node_handle_map) n)
|
1587
2087
|
{
|
1588
|
-
|
1589
|
-
|
2088
|
+
BOOST_ASSERT(!has_alloc_ ||
|
2089
|
+
value_allocator_traits::
|
2090
|
+
propagate_on_container_move_assignment::value ||
|
2091
|
+
(n.has_alloc_ && alloc_.value() == n.alloc_.value()));
|
1590
2092
|
|
1591
|
-
|
2093
|
+
if (ptr_) {
|
2094
|
+
node_allocator node_alloc(alloc_.value());
|
2095
|
+
boost::unordered::detail::node_tmp<node_allocator> tmp(
|
2096
|
+
ptr_, node_alloc);
|
2097
|
+
ptr_ = node_pointer();
|
2098
|
+
}
|
1592
2099
|
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
}
|
2100
|
+
if (has_alloc_) {
|
2101
|
+
alloc_.value_ptr()->~value_allocator();
|
2102
|
+
has_alloc_ = false;
|
2103
|
+
}
|
1598
2104
|
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
2105
|
+
if (!has_alloc_ && n.has_alloc_) {
|
2106
|
+
move_allocator(n);
|
2107
|
+
}
|
2108
|
+
|
2109
|
+
ptr_ = n.ptr_;
|
2110
|
+
n.ptr_ = node_pointer();
|
2111
|
+
|
2112
|
+
return *this;
|
1603
2113
|
}
|
1604
2114
|
|
1605
|
-
|
1606
|
-
|
2115
|
+
key_type& key() const { return const_cast<key_type&>(ptr_->value().first); }
|
2116
|
+
|
2117
|
+
mapped_type& mapped() const { return ptr_->value().second; }
|
2118
|
+
|
2119
|
+
allocator_type get_allocator() const { return alloc_.value(); }
|
2120
|
+
|
2121
|
+
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
|
2122
|
+
|
2123
|
+
bool operator!() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
2124
|
+
|
2125
|
+
bool empty() const BOOST_NOEXCEPT { return ptr_ ? 0 : 1; }
|
2126
|
+
|
2127
|
+
void swap(node_handle_map& n) BOOST_NOEXCEPT_IF(
|
2128
|
+
value_allocator_traits::propagate_on_container_swap::value
|
2129
|
+
/* || value_allocator_traits::is_always_equal::value */)
|
1607
2130
|
{
|
1608
|
-
|
2131
|
+
if (!has_alloc_) {
|
2132
|
+
if (n.has_alloc_) {
|
2133
|
+
move_allocator(n);
|
2134
|
+
}
|
2135
|
+
} else if (!n.has_alloc_) {
|
2136
|
+
n.move_allocator(*this);
|
2137
|
+
} else {
|
2138
|
+
swap_impl(n, boost::unordered::detail::integral_constant<bool,
|
2139
|
+
value_allocator_traits::
|
2140
|
+
propagate_on_container_swap::value>());
|
2141
|
+
}
|
2142
|
+
boost::swap(ptr_, n.ptr_);
|
1609
2143
|
}
|
1610
2144
|
|
1611
|
-
|
1612
|
-
void
|
2145
|
+
private:
|
2146
|
+
void move_allocator(node_handle_map& n)
|
1613
2147
|
{
|
1614
|
-
|
2148
|
+
new ((void*)&alloc_) value_allocator(boost::move(n.alloc_.value()));
|
2149
|
+
n.alloc_.value_ptr()->~value_allocator();
|
2150
|
+
has_alloc_ = true;
|
2151
|
+
n.has_alloc_ = false;
|
1615
2152
|
}
|
1616
2153
|
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
unordered_multimap<K,T,H,P,A> const& m2)
|
2154
|
+
void swap_impl(node_handle_map&, boost::unordered::detail::false_type) {}
|
2155
|
+
|
2156
|
+
void swap_impl(node_handle_map& n, boost::unordered::detail::true_type)
|
1621
2157
|
{
|
1622
|
-
|
1623
|
-
struct dummy { unordered_multimap<K,T,H,P,A> x; };
|
1624
|
-
#endif
|
1625
|
-
return m1.table_.equals(m2.table_);
|
2158
|
+
boost::swap(alloc_, n.alloc_);
|
1626
2159
|
}
|
2160
|
+
};
|
1627
2161
|
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
2162
|
+
template <class N, class K, class T, class A>
|
2163
|
+
void swap(node_handle_map<N, K, T, A>& x, node_handle_map<N, K, T, A>& y)
|
2164
|
+
BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(x.swap(y)))
|
2165
|
+
{
|
2166
|
+
x.swap(y);
|
2167
|
+
}
|
2168
|
+
|
2169
|
+
template <class N, class K, class T, class A> struct insert_return_type_map
|
2170
|
+
{
|
2171
|
+
private:
|
2172
|
+
BOOST_MOVABLE_BUT_NOT_COPYABLE(insert_return_type_map)
|
2173
|
+
|
2174
|
+
typedef typename boost::unordered::detail::rebind_wrap<A,
|
2175
|
+
std::pair<K const, T> >::type value_allocator;
|
2176
|
+
typedef N node_;
|
2177
|
+
|
2178
|
+
public:
|
2179
|
+
bool inserted;
|
2180
|
+
boost::unordered::iterator_detail::iterator<node_> position;
|
2181
|
+
boost::unordered::node_handle_map<N, K, T, A> node;
|
2182
|
+
|
2183
|
+
insert_return_type_map() : inserted(false), position(), node() {}
|
2184
|
+
|
2185
|
+
insert_return_type_map(BOOST_RV_REF(insert_return_type_map)
|
2186
|
+
x) BOOST_NOEXCEPT : inserted(x.inserted),
|
2187
|
+
position(x.position),
|
2188
|
+
node(boost::move(x.node))
|
1632
2189
|
{
|
1633
|
-
#if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x0613))
|
1634
|
-
struct dummy { unordered_multimap<K,T,H,P,A> x; };
|
1635
|
-
#endif
|
1636
|
-
return !m1.table_.equals(m2.table_);
|
1637
2190
|
}
|
1638
2191
|
|
1639
|
-
|
1640
|
-
inline void swap(
|
1641
|
-
unordered_multimap<K,T,H,P,A> &m1,
|
1642
|
-
unordered_multimap<K,T,H,P,A> &m2)
|
2192
|
+
insert_return_type_map& operator=(BOOST_RV_REF(insert_return_type_map) x)
|
1643
2193
|
{
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
2194
|
+
inserted = x.inserted;
|
2195
|
+
position = x.position;
|
2196
|
+
node = boost::move(x.node);
|
2197
|
+
return *this;
|
1648
2198
|
}
|
2199
|
+
};
|
1649
2200
|
|
2201
|
+
template <class N, class K, class T, class A>
|
2202
|
+
void swap(insert_return_type_map<N, K, T, A>& x,
|
2203
|
+
insert_return_type_map<N, K, T, A>& y)
|
2204
|
+
{
|
2205
|
+
boost::swap(x.node, y.node);
|
2206
|
+
boost::swap(x.inserted, y.inserted);
|
2207
|
+
boost::swap(x.position, y.position);
|
2208
|
+
}
|
1650
2209
|
} // namespace unordered
|
1651
2210
|
} // namespace boost
|
1652
2211
|
|