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
@@ -47,6 +47,11 @@
|
|
47
47
|
namespace boost {
|
48
48
|
namespace container {
|
49
49
|
|
50
|
+
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
51
|
+
template <class Key, class T, class Compare, class Allocator>
|
52
|
+
class flat_multimap;
|
53
|
+
#endif
|
54
|
+
|
50
55
|
//! flat_set is a Sorted Associative Container that stores objects of type Key.
|
51
56
|
//! It is also a Unique Associative Container, meaning that no two elements are the same.
|
52
57
|
//!
|
@@ -69,13 +74,21 @@ template <class Key, class Compare, class Allocator>
|
|
69
74
|
#endif
|
70
75
|
class flat_set
|
71
76
|
///@cond
|
72
|
-
: public container_detail::flat_tree<Key,
|
77
|
+
: public container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator>
|
73
78
|
///@endcond
|
74
79
|
{
|
75
80
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
76
81
|
private:
|
77
82
|
BOOST_COPYABLE_AND_MOVABLE(flat_set)
|
78
|
-
typedef container_detail::flat_tree<Key,
|
83
|
+
typedef container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator> base_t;
|
84
|
+
|
85
|
+
public:
|
86
|
+
base_t &tree()
|
87
|
+
{ return *this; }
|
88
|
+
|
89
|
+
const base_t &tree() const
|
90
|
+
{ return *this; }
|
91
|
+
|
79
92
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
80
93
|
|
81
94
|
public:
|
@@ -112,7 +125,8 @@ class flat_set
|
|
112
125
|
//! <b>Effects</b>: Default constructs an empty container.
|
113
126
|
//!
|
114
127
|
//! <b>Complexity</b>: Constant.
|
115
|
-
explicit flat_set()
|
128
|
+
explicit flat_set() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
129
|
+
container_detail::is_nothrow_default_constructible<Compare>::value)
|
116
130
|
: base_t()
|
117
131
|
{}
|
118
132
|
|
@@ -168,7 +182,7 @@ class flat_set
|
|
168
182
|
flat_set(ordered_unique_range_t, InputIterator first, InputIterator last,
|
169
183
|
const Compare& comp = Compare(),
|
170
184
|
const allocator_type& a = allocator_type())
|
171
|
-
: base_t(
|
185
|
+
: base_t(ordered_unique_range, first, last, comp, a)
|
172
186
|
{}
|
173
187
|
|
174
188
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
@@ -203,7 +217,7 @@ class flat_set
|
|
203
217
|
//! <b>Note</b>: Non-standard extension.
|
204
218
|
flat_set(ordered_unique_range_t, std::initializer_list<value_type> il,
|
205
219
|
const Compare& comp = Compare(), const allocator_type& a = allocator_type())
|
206
|
-
: base_t(
|
220
|
+
: base_t(ordered_unique_range, il.begin(), il.end(), comp, a)
|
207
221
|
{}
|
208
222
|
#endif
|
209
223
|
|
@@ -220,6 +234,7 @@ class flat_set
|
|
220
234
|
//!
|
221
235
|
//! <b>Postcondition</b>: x is emptied.
|
222
236
|
flat_set(BOOST_RV_REF(flat_set) x)
|
237
|
+
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
223
238
|
: base_t(BOOST_MOVE_BASE(base_t, x))
|
224
239
|
{}
|
225
240
|
|
@@ -251,8 +266,9 @@ class flat_set
|
|
251
266
|
//! propagate_on_container_move_assignment is true or
|
252
267
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
253
268
|
flat_set& operator=(BOOST_RV_REF(flat_set) x)
|
254
|
-
BOOST_NOEXCEPT_IF(
|
255
|
-
|
269
|
+
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
270
|
+
allocator_traits_type::is_always_equal::value) &&
|
271
|
+
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
256
272
|
{ return static_cast<flat_set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
257
273
|
|
258
274
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
@@ -602,6 +618,26 @@ class flat_set
|
|
602
618
|
{ this->base_t::insert_unique(ordered_unique_range, il.begin(), il.end()); }
|
603
619
|
#endif
|
604
620
|
|
621
|
+
//! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, Allocator>&)
|
622
|
+
template<class C2>
|
623
|
+
BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, Allocator>& source)
|
624
|
+
{ this->base_t::merge_unique(source.tree()); }
|
625
|
+
|
626
|
+
//! @copydoc ::boost::container::flat_map::merge(flat_set<Key, C2, Allocator>&)
|
627
|
+
template<class C2>
|
628
|
+
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, Allocator> BOOST_RV_REF_END source)
|
629
|
+
{ return this->merge(static_cast<flat_set<Key, C2, Allocator>&>(source)); }
|
630
|
+
|
631
|
+
//! @copydoc ::boost::container::flat_map::merge(flat_multimap<Key, T, C2, Allocator>&)
|
632
|
+
template<class C2>
|
633
|
+
BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, Allocator>& source)
|
634
|
+
{ this->base_t::merge_unique(source.tree()); }
|
635
|
+
|
636
|
+
//! @copydoc ::boost::container::flat_map::merge(flat_multiset<Key, C2, Allocator>&)
|
637
|
+
template<class C2>
|
638
|
+
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, Allocator> BOOST_RV_REF_END source)
|
639
|
+
{ return this->merge(static_cast<flat_multiset<Key, C2, Allocator>&>(source)); }
|
640
|
+
|
605
641
|
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
606
642
|
|
607
643
|
//! <b>Effects</b>: Erases the element pointed to by p.
|
@@ -700,11 +736,10 @@ class flat_set
|
|
700
736
|
//! <b>Note</b>: Non-standard extension
|
701
737
|
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW;
|
702
738
|
|
703
|
-
//! <b>Requires</b>:
|
739
|
+
//! <b>Requires</b>: begin() <= p <= end().
|
704
740
|
//!
|
705
|
-
//! <b>Effects</b>: Returns
|
706
|
-
//!
|
707
|
-
//! if n == size().
|
741
|
+
//! <b>Effects</b>: Returns the index of the element pointed by p
|
742
|
+
//! and size() if p == end().
|
708
743
|
//!
|
709
744
|
//! <b>Throws</b>: Nothing.
|
710
745
|
//!
|
@@ -865,13 +900,20 @@ template <class Key, class Compare, class Allocator>
|
|
865
900
|
#endif
|
866
901
|
class flat_multiset
|
867
902
|
///@cond
|
868
|
-
: public container_detail::flat_tree<Key,
|
903
|
+
: public container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator>
|
869
904
|
///@endcond
|
870
905
|
{
|
871
906
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
872
907
|
private:
|
873
908
|
BOOST_COPYABLE_AND_MOVABLE(flat_multiset)
|
874
|
-
typedef container_detail::flat_tree<Key,
|
909
|
+
typedef container_detail::flat_tree<Key, container_detail::identity<Key>, Compare, Allocator> base_t;
|
910
|
+
|
911
|
+
public:
|
912
|
+
base_t &tree()
|
913
|
+
{ return *this; }
|
914
|
+
|
915
|
+
const base_t &tree() const
|
916
|
+
{ return *this; }
|
875
917
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
876
918
|
|
877
919
|
public:
|
@@ -899,7 +941,8 @@ class flat_multiset
|
|
899
941
|
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
|
900
942
|
|
901
943
|
//! @copydoc ::boost::container::flat_set::flat_set()
|
902
|
-
explicit flat_multiset()
|
944
|
+
explicit flat_multiset() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
945
|
+
container_detail::is_nothrow_default_constructible<Compare>::value)
|
903
946
|
: base_t()
|
904
947
|
{}
|
905
948
|
|
@@ -956,8 +999,16 @@ class flat_multiset
|
|
956
999
|
: base_t(false, il.begin(), il.end(), Compare(), a)
|
957
1000
|
{}
|
958
1001
|
|
959
|
-
//!
|
960
|
-
|
1002
|
+
//! <b>Effects</b>: Constructs an empty container using the specified comparison object and
|
1003
|
+
//! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
|
1004
|
+
//! is more efficient than the normal range creation for ordered ranges.
|
1005
|
+
//!
|
1006
|
+
//! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
|
1007
|
+
//!
|
1008
|
+
//! <b>Complexity</b>: Linear in N.
|
1009
|
+
//!
|
1010
|
+
//! <b>Note</b>: Non-standard extension.
|
1011
|
+
flat_multiset(ordered_range_t, std::initializer_list<value_type> il,
|
961
1012
|
const Compare& comp = Compare(), const allocator_type& a = allocator_type())
|
962
1013
|
: base_t(ordered_range, il.begin(), il.end(), comp, a)
|
963
1014
|
{}
|
@@ -970,6 +1021,7 @@ class flat_multiset
|
|
970
1021
|
|
971
1022
|
//! @copydoc ::boost::container::flat_set::flat_set(flat_set &&)
|
972
1023
|
flat_multiset(BOOST_RV_REF(flat_multiset) x)
|
1024
|
+
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
973
1025
|
: base_t(boost::move(static_cast<base_t&>(x)))
|
974
1026
|
{}
|
975
1027
|
|
@@ -989,8 +1041,9 @@ class flat_multiset
|
|
989
1041
|
|
990
1042
|
//! @copydoc ::boost::container::flat_set::operator=(flat_set &&)
|
991
1043
|
flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
|
992
|
-
BOOST_NOEXCEPT_IF(
|
993
|
-
|
1044
|
+
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
1045
|
+
allocator_traits_type::is_always_equal::value) &&
|
1046
|
+
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
994
1047
|
{ return static_cast<flat_multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
995
1048
|
|
996
1049
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
@@ -1220,6 +1273,26 @@ class flat_multiset
|
|
1220
1273
|
{ this->base_t::insert_equal(ordered_range, il.begin(), il.end()); }
|
1221
1274
|
#endif
|
1222
1275
|
|
1276
|
+
//! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, Allocator>&)
|
1277
|
+
template<class C2>
|
1278
|
+
BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, Allocator>& source)
|
1279
|
+
{ this->base_t::merge_equal(source.tree()); }
|
1280
|
+
|
1281
|
+
//! @copydoc ::boost::container::flat_multiset::merge(flat_multiset<Key, C2, Allocator>&)
|
1282
|
+
template<class C2>
|
1283
|
+
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, Allocator> BOOST_RV_REF_END source)
|
1284
|
+
{ return this->merge(static_cast<flat_multiset<Key, C2, Allocator>&>(source)); }
|
1285
|
+
|
1286
|
+
//! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, Allocator>&)
|
1287
|
+
template<class C2>
|
1288
|
+
BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, Allocator>& source)
|
1289
|
+
{ this->base_t::merge_equal(source.tree()); }
|
1290
|
+
|
1291
|
+
//! @copydoc ::boost::container::flat_multiset::merge(flat_set<Key, C2, Allocator>&)
|
1292
|
+
template<class C2>
|
1293
|
+
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, Allocator> BOOST_RV_REF_END source)
|
1294
|
+
{ return this->merge(static_cast<flat_set<Key, C2, Allocator>&>(source)); }
|
1295
|
+
|
1223
1296
|
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1224
1297
|
|
1225
1298
|
//! @copydoc ::boost::container::flat_set::erase(const_iterator)
|
@@ -188,7 +188,7 @@ class list
|
|
188
188
|
//! <b>Throws</b>: If allocator_type's default constructor throws.
|
189
189
|
//!
|
190
190
|
//! <b>Complexity</b>: Constant.
|
191
|
-
list()
|
191
|
+
list() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
|
192
192
|
: AllocHolder()
|
193
193
|
{}
|
194
194
|
|
@@ -250,7 +250,7 @@ class list
|
|
250
250
|
//! <b>Throws</b>: If allocator_type's copy constructor throws.
|
251
251
|
//!
|
252
252
|
//! <b>Complexity</b>: Constant.
|
253
|
-
list(BOOST_RV_REF(list) x)
|
253
|
+
list(BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW
|
254
254
|
: AllocHolder(BOOST_MOVE_BASE(AllocHolder, x))
|
255
255
|
{}
|
256
256
|
|
@@ -408,7 +408,7 @@ class list
|
|
408
408
|
return this->assign(cvalue_iterator(val, n), cvalue_iterator());
|
409
409
|
}
|
410
410
|
|
411
|
-
//! <b>Effects</b>: Assigns the
|
411
|
+
//! <b>Effects</b>: Assigns the range [first, last) to *this.
|
412
412
|
//!
|
413
413
|
//! <b>Throws</b>: If memory allocation throws or
|
414
414
|
//! T's constructor from dereferencing InpIt throws.
|
@@ -433,7 +433,7 @@ class list
|
|
433
433
|
}
|
434
434
|
|
435
435
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
436
|
-
//! <b>Effects</b>: Assigns the
|
436
|
+
//! <b>Effects</b>: Assigns the range [il.begin(), il.end()) to *this.
|
437
437
|
//!
|
438
438
|
//! <b>Throws</b>: If memory allocation throws or
|
439
439
|
//! T's constructor from dereferencing std::initializer_list iterator throws.
|
@@ -709,24 +709,28 @@ class list
|
|
709
709
|
//! <b>Effects</b>: Inserts an object of type T constructed with
|
710
710
|
//! std::forward<Args>(args)... in the end of the list.
|
711
711
|
//!
|
712
|
+
//! <b>Returns</b>: A reference to the created object.
|
713
|
+
//!
|
712
714
|
//! <b>Throws</b>: If memory allocation throws or
|
713
715
|
//! T's in-place constructor throws.
|
714
716
|
//!
|
715
717
|
//! <b>Complexity</b>: Constant
|
716
718
|
template <class... Args>
|
717
|
-
|
718
|
-
{ this->emplace(this->cend(), boost::forward<Args>(args)...); }
|
719
|
+
reference emplace_back(BOOST_FWD_REF(Args)... args)
|
720
|
+
{ return *this->emplace(this->cend(), boost::forward<Args>(args)...); }
|
719
721
|
|
720
722
|
//! <b>Effects</b>: Inserts an object of type T constructed with
|
721
723
|
//! std::forward<Args>(args)... in the beginning of the list.
|
722
724
|
//!
|
725
|
+
//! <b>Returns</b>: A reference to the created object.
|
726
|
+
//!
|
723
727
|
//! <b>Throws</b>: If memory allocation throws or
|
724
728
|
//! T's in-place constructor throws.
|
725
729
|
//!
|
726
730
|
//! <b>Complexity</b>: Constant
|
727
731
|
template <class... Args>
|
728
|
-
|
729
|
-
{ this->emplace(this->cbegin(), boost::forward<Args>(args)...); }
|
732
|
+
reference emplace_front(BOOST_FWD_REF(Args)... args)
|
733
|
+
{ return *this->emplace(this->cbegin(), boost::forward<Args>(args)...); }
|
730
734
|
|
731
735
|
//! <b>Effects</b>: Inserts an object of type T constructed with
|
732
736
|
//! std::forward<Args>(args)... before p.
|
@@ -747,12 +751,12 @@ class list
|
|
747
751
|
|
748
752
|
#define BOOST_CONTAINER_LIST_EMPLACE_CODE(N) \
|
749
753
|
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
750
|
-
|
751
|
-
{ this->emplace(this->cend() BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
754
|
+
reference emplace_back(BOOST_MOVE_UREF##N)\
|
755
|
+
{ return *this->emplace(this->cend() BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
752
756
|
\
|
753
757
|
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
754
|
-
|
755
|
-
{ this->emplace(this->cbegin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
|
758
|
+
reference emplace_front(BOOST_MOVE_UREF##N)\
|
759
|
+
{ return *this->emplace(this->cbegin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
|
756
760
|
\
|
757
761
|
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
758
762
|
iterator emplace(const_iterator position BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
@@ -948,7 +952,7 @@ class list
|
|
948
952
|
|
949
953
|
//! <b>Requires</b>: p must be a valid iterator of *this.
|
950
954
|
//!
|
951
|
-
//! <b>Effects</b>: Erases the element at p
|
955
|
+
//! <b>Effects</b>: Erases the element at p.
|
952
956
|
//!
|
953
957
|
//! <b>Throws</b>: Nothing.
|
954
958
|
//!
|
@@ -1045,7 +1049,7 @@ class list
|
|
1045
1049
|
//! this' allocator and x's allocator shall compare equal
|
1046
1050
|
//!
|
1047
1051
|
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
|
1048
|
-
//! before the
|
1052
|
+
//! before the element pointed by p. No destructors or copy constructors are called.
|
1049
1053
|
//! If p == i or p == ++i, this function is a null operation.
|
1050
1054
|
//!
|
1051
1055
|
//! <b>Throws</b>: Nothing
|
@@ -1066,7 +1070,7 @@ class list
|
|
1066
1070
|
//! this' allocator and x's allocator shall compare equal.
|
1067
1071
|
//!
|
1068
1072
|
//! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
|
1069
|
-
//! before the
|
1073
|
+
//! before the element pointed by p. No destructors or copy constructors are called.
|
1070
1074
|
//! If p == i or p == ++i, this function is a null operation.
|
1071
1075
|
//!
|
1072
1076
|
//! <b>Throws</b>: Nothing
|
@@ -1087,7 +1091,7 @@ class list
|
|
1087
1091
|
//! this' allocator and x's allocator shall compare equal
|
1088
1092
|
//!
|
1089
1093
|
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
|
1090
|
-
//! before the
|
1094
|
+
//! before the element pointed by p. No destructors or copy constructors are called.
|
1091
1095
|
//!
|
1092
1096
|
//! <b>Throws</b>: Nothing
|
1093
1097
|
//!
|
@@ -1109,7 +1113,7 @@ class list
|
|
1109
1113
|
//! this' allocator and x's allocator shall compare equal.
|
1110
1114
|
//!
|
1111
1115
|
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
|
1112
|
-
//! before the
|
1116
|
+
//! before the element pointed by p. No destructors or copy constructors are called.
|
1113
1117
|
//!
|
1114
1118
|
//! <b>Throws</b>: Nothing
|
1115
1119
|
//!
|
@@ -1129,7 +1133,7 @@ class list
|
|
1129
1133
|
//! n == distance(first, last). this' allocator and x's allocator shall compare equal
|
1130
1134
|
//!
|
1131
1135
|
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
|
1132
|
-
//! before the
|
1136
|
+
//! before the element pointed by p. No destructors or copy constructors are called.
|
1133
1137
|
//!
|
1134
1138
|
//! <b>Throws</b>: Nothing
|
1135
1139
|
//!
|
@@ -1150,7 +1154,7 @@ class list
|
|
1150
1154
|
//! n == distance(first, last). this' allocator and x's allocator shall compare equal
|
1151
1155
|
//!
|
1152
1156
|
//! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
|
1153
|
-
//! before the
|
1157
|
+
//! before the element pointed by p. No destructors or copy constructors are called.
|
1154
1158
|
//!
|
1155
1159
|
//! <b>Throws</b>: Nothing
|
1156
1160
|
//!
|
@@ -53,6 +53,34 @@
|
|
53
53
|
namespace boost {
|
54
54
|
namespace container {
|
55
55
|
|
56
|
+
///@cond
|
57
|
+
|
58
|
+
template<class Key, class Mapped>
|
59
|
+
struct pair_key_mapped_of_value
|
60
|
+
{
|
61
|
+
typedef Key key_type;
|
62
|
+
typedef Mapped mapped_type;
|
63
|
+
|
64
|
+
template<class Pair>
|
65
|
+
const key_type & key_of_value(const Pair &p) const
|
66
|
+
{ return p.first; }
|
67
|
+
|
68
|
+
template<class Pair>
|
69
|
+
const mapped_type & mapped_of_value(const Pair &p) const
|
70
|
+
{ return p.second; }
|
71
|
+
|
72
|
+
template<class Pair>
|
73
|
+
key_type & key_of_value(Pair &p) const
|
74
|
+
{ return const_cast<key_type&>(p.first); }
|
75
|
+
|
76
|
+
template<class Pair>
|
77
|
+
mapped_type & mapped_of_value(Pair &p) const
|
78
|
+
{ return p.second; }
|
79
|
+
|
80
|
+
};
|
81
|
+
|
82
|
+
///@endcond
|
83
|
+
|
56
84
|
#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
|
57
85
|
|
58
86
|
//! A map is a kind of associative container that supports unique keys (contains at
|
@@ -68,31 +96,30 @@ namespace container {
|
|
68
96
|
//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
|
69
97
|
//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
|
70
98
|
//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
|
71
|
-
//! \tparam
|
99
|
+
//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
|
72
100
|
template < class Key, class T, class Compare = std::less<Key>
|
73
|
-
, class Allocator = new_allocator< std::pair< const Key, T> >, class
|
101
|
+
, class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults >
|
74
102
|
#else
|
75
|
-
template <class Key, class T, class Compare, class Allocator, class
|
103
|
+
template <class Key, class T, class Compare, class Allocator, class Options>
|
76
104
|
#endif
|
77
105
|
class map
|
78
106
|
///@cond
|
79
107
|
: public container_detail::tree
|
80
|
-
<
|
81
|
-
, container_detail::select1st<
|
82
|
-
, Compare, Allocator,
|
108
|
+
< std::pair<const Key, T>
|
109
|
+
, container_detail::select1st<Key>
|
110
|
+
, Compare, Allocator, Options>
|
83
111
|
///@endcond
|
84
112
|
{
|
85
113
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
86
114
|
private:
|
87
115
|
BOOST_COPYABLE_AND_MOVABLE(map)
|
88
116
|
|
89
|
-
typedef
|
117
|
+
typedef container_detail::select1st<Key> select_1st_t;
|
118
|
+
typedef std::pair<const Key, T> value_type_impl;
|
90
119
|
typedef container_detail::tree
|
91
|
-
<
|
92
|
-
typedef container_detail::pair <Key, T>
|
93
|
-
typedef
|
94
|
-
< Key, value_type_impl, Compare, container_detail::select1st<value_type_impl>
|
95
|
-
> value_compare_impl;
|
120
|
+
<value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
|
121
|
+
typedef container_detail::pair <Key, T> movable_value_type_impl;
|
122
|
+
typedef typename base_t::value_compare value_compare_impl;
|
96
123
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
97
124
|
|
98
125
|
public:
|
@@ -102,10 +129,10 @@ class map
|
|
102
129
|
//
|
103
130
|
//////////////////////////////////////////////
|
104
131
|
|
105
|
-
typedef Key
|
106
|
-
typedef ::boost::container::allocator_traits<Allocator>
|
107
|
-
typedef T
|
108
|
-
typedef std::pair<const Key, T>
|
132
|
+
typedef Key key_type;
|
133
|
+
typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
|
134
|
+
typedef T mapped_type;
|
135
|
+
typedef std::pair<const Key, T> value_type;
|
109
136
|
typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
|
110
137
|
typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
|
111
138
|
typedef typename boost::container::allocator_traits<Allocator>::reference reference;
|
@@ -122,6 +149,14 @@ class map
|
|
122
149
|
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
|
123
150
|
typedef std::pair<key_type, mapped_type> nonconst_value_type;
|
124
151
|
typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
|
152
|
+
typedef BOOST_CONTAINER_IMPDEF(node_handle<
|
153
|
+
typename base_t::node_type::container_node_type
|
154
|
+
BOOST_MOVE_I value_type
|
155
|
+
BOOST_MOVE_I allocator_type
|
156
|
+
BOOST_MOVE_I pair_key_mapped_of_value
|
157
|
+
<key_type BOOST_MOVE_I mapped_type> >) node_type;
|
158
|
+
typedef BOOST_CONTAINER_IMPDEF
|
159
|
+
(insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type;
|
125
160
|
|
126
161
|
//////////////////////////////////////////////
|
127
162
|
//
|
@@ -132,7 +167,9 @@ class map
|
|
132
167
|
//! <b>Effects</b>: Default constructs an empty map.
|
133
168
|
//!
|
134
169
|
//! <b>Complexity</b>: Constant.
|
135
|
-
|
170
|
+
BOOST_CONTAINER_FORCEINLINE
|
171
|
+
map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
172
|
+
container_detail::is_nothrow_default_constructible<Compare>::value)
|
136
173
|
: base_t()
|
137
174
|
{
|
138
175
|
//A type must be std::pair<CONST Key, T>
|
@@ -143,6 +180,7 @@ class map
|
|
143
180
|
//! and allocator.
|
144
181
|
//!
|
145
182
|
//! <b>Complexity</b>: Constant.
|
183
|
+
BOOST_CONTAINER_FORCEINLINE
|
146
184
|
explicit map(const Compare& comp, const allocator_type& a = allocator_type())
|
147
185
|
: base_t(comp, a)
|
148
186
|
{
|
@@ -153,6 +191,7 @@ class map
|
|
153
191
|
//! <b>Effects</b>: Constructs an empty map using the specified allocator.
|
154
192
|
//!
|
155
193
|
//! <b>Complexity</b>: Constant.
|
194
|
+
BOOST_CONTAINER_FORCEINLINE
|
156
195
|
explicit map(const allocator_type& a)
|
157
196
|
: base_t(a)
|
158
197
|
{
|
@@ -166,6 +205,7 @@ class map
|
|
166
205
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
167
206
|
//! comp and otherwise N logN, where N is last - first.
|
168
207
|
template <class InputIterator>
|
208
|
+
BOOST_CONTAINER_FORCEINLINE
|
169
209
|
map(InputIterator first, InputIterator last, const Compare& comp = Compare(),
|
170
210
|
const allocator_type& a = allocator_type())
|
171
211
|
: base_t(true, first, last, comp, a)
|
@@ -180,6 +220,7 @@ class map
|
|
180
220
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
181
221
|
//! comp and otherwise N logN, where N is last - first.
|
182
222
|
template <class InputIterator>
|
223
|
+
BOOST_CONTAINER_FORCEINLINE
|
183
224
|
map(InputIterator first, InputIterator last, const allocator_type& a)
|
184
225
|
: base_t(true, first, last, Compare(), a)
|
185
226
|
{
|
@@ -198,6 +239,7 @@ class map
|
|
198
239
|
//!
|
199
240
|
//! <b>Note</b>: Non-standard extension.
|
200
241
|
template <class InputIterator>
|
242
|
+
BOOST_CONTAINER_FORCEINLINE
|
201
243
|
map( ordered_unique_range_t, InputIterator first, InputIterator last
|
202
244
|
, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
|
203
245
|
: base_t(ordered_range, first, last, comp, a)
|
@@ -212,6 +254,7 @@ class map
|
|
212
254
|
//!
|
213
255
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
214
256
|
//! comp and otherwise N logN, where N is il.first() - il.end().
|
257
|
+
BOOST_CONTAINER_FORCEINLINE
|
215
258
|
map(std::initializer_list<value_type> il, const Compare& comp = Compare(), const allocator_type& a = allocator_type())
|
216
259
|
: base_t(true, il.begin(), il.end(), comp, a)
|
217
260
|
{
|
@@ -224,6 +267,7 @@ class map
|
|
224
267
|
//!
|
225
268
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
226
269
|
//! comp and otherwise N logN, where N is il.first() - il.end().
|
270
|
+
BOOST_CONTAINER_FORCEINLINE
|
227
271
|
map(std::initializer_list<value_type> il, const allocator_type& a)
|
228
272
|
: base_t(true, il.begin(), il.end(), Compare(), a)
|
229
273
|
{
|
@@ -241,6 +285,7 @@ class map
|
|
241
285
|
//! <b>Complexity</b>: Linear in N.
|
242
286
|
//!
|
243
287
|
//! <b>Note</b>: Non-standard extension.
|
288
|
+
BOOST_CONTAINER_FORCEINLINE
|
244
289
|
map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(),
|
245
290
|
const allocator_type& a = allocator_type())
|
246
291
|
: base_t(ordered_range, il.begin(), il.end(), comp, a)
|
@@ -253,6 +298,7 @@ class map
|
|
253
298
|
//! <b>Effects</b>: Copy constructs a map.
|
254
299
|
//!
|
255
300
|
//! <b>Complexity</b>: Linear in x.size().
|
301
|
+
BOOST_CONTAINER_FORCEINLINE
|
256
302
|
map(const map& x)
|
257
303
|
: base_t(static_cast<const base_t&>(x))
|
258
304
|
{
|
@@ -265,7 +311,9 @@ class map
|
|
265
311
|
//! <b>Complexity</b>: Constant.
|
266
312
|
//!
|
267
313
|
//! <b>Postcondition</b>: x is emptied.
|
314
|
+
BOOST_CONTAINER_FORCEINLINE
|
268
315
|
map(BOOST_RV_REF(map) x)
|
316
|
+
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
269
317
|
: base_t(BOOST_MOVE_BASE(base_t, x))
|
270
318
|
{
|
271
319
|
//A type must be std::pair<CONST Key, T>
|
@@ -275,6 +323,7 @@ class map
|
|
275
323
|
//! <b>Effects</b>: Copy constructs a map using the specified allocator.
|
276
324
|
//!
|
277
325
|
//! <b>Complexity</b>: Linear in x.size().
|
326
|
+
BOOST_CONTAINER_FORCEINLINE
|
278
327
|
map(const map& x, const allocator_type &a)
|
279
328
|
: base_t(static_cast<const base_t&>(x), a)
|
280
329
|
{
|
@@ -288,6 +337,7 @@ class map
|
|
288
337
|
//! <b>Complexity</b>: Constant if x == x.get_allocator(), linear otherwise.
|
289
338
|
//!
|
290
339
|
//! <b>Postcondition</b>: x is emptied.
|
340
|
+
BOOST_CONTAINER_FORCEINLINE
|
291
341
|
map(BOOST_RV_REF(map) x, const allocator_type &a)
|
292
342
|
: base_t(BOOST_MOVE_BASE(base_t, x), a)
|
293
343
|
{
|
@@ -298,6 +348,7 @@ class map
|
|
298
348
|
//! <b>Effects</b>: Makes *this a copy of x.
|
299
349
|
//!
|
300
350
|
//! <b>Complexity</b>: Linear in x.size().
|
351
|
+
BOOST_CONTAINER_FORCEINLINE
|
301
352
|
map& operator=(BOOST_COPY_ASSIGN_REF(map) x)
|
302
353
|
{ return static_cast<map&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
|
303
354
|
|
@@ -309,15 +360,17 @@ class map
|
|
309
360
|
//! <b>Complexity</b>: Constant if allocator_traits_type::
|
310
361
|
//! propagate_on_container_move_assignment is true or
|
311
362
|
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
363
|
+
BOOST_CONTAINER_FORCEINLINE
|
312
364
|
map& operator=(BOOST_RV_REF(map) x)
|
313
|
-
BOOST_NOEXCEPT_IF(
|
314
|
-
|
315
|
-
|
365
|
+
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
366
|
+
allocator_traits_type::is_always_equal::value) &&
|
367
|
+
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
316
368
|
{ return static_cast<map&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
317
369
|
|
318
370
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
319
371
|
//! <b>Effects</b>: Assign content of il to *this.
|
320
372
|
//!
|
373
|
+
BOOST_CONTAINER_FORCEINLINE
|
321
374
|
map& operator=(std::initializer_list<value_type> il)
|
322
375
|
{
|
323
376
|
this->clear();
|
@@ -466,32 +519,100 @@ class map
|
|
466
519
|
#endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
467
520
|
|
468
521
|
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
469
|
-
//! Effects
|
522
|
+
//! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
|
470
523
|
//! value_type(x, T()) into the map.
|
471
524
|
//!
|
472
|
-
//! Returns
|
525
|
+
//! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
|
473
526
|
//!
|
474
|
-
//! Complexity
|
527
|
+
//! <b>Complexity</b>: Logarithmic.
|
475
528
|
mapped_type& operator[](const key_type &k);
|
476
529
|
|
477
|
-
//! Effects
|
530
|
+
//! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
|
478
531
|
//! value_type(boost::move(x), T()) into the map (the key is move-constructed)
|
479
532
|
//!
|
480
|
-
//! Returns
|
533
|
+
//! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
|
481
534
|
//!
|
482
|
-
//! Complexity
|
535
|
+
//! <b>Complexity</b>: Logarithmic.
|
483
536
|
mapped_type& operator[](key_type &&k);
|
484
537
|
#elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
|
485
538
|
//in compilers like GCC 3.4, we can't catch temporaries
|
486
|
-
mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
|
487
|
-
mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
|
539
|
+
BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
|
540
|
+
BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
|
488
541
|
#else
|
489
542
|
BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
|
490
543
|
#endif
|
491
544
|
|
492
|
-
//!
|
545
|
+
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
|
546
|
+
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
|
547
|
+
//! as if by insert, constructing it from value_type(k, forward<M>(obj)).
|
548
|
+
//!
|
549
|
+
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
|
550
|
+
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
|
551
|
+
//! references obtained to that element before it was extracted become valid.
|
552
|
+
//!
|
553
|
+
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
|
554
|
+
//! took place. The iterator component is pointing at the element that was inserted or updated.
|
555
|
+
//!
|
556
|
+
//! <b>Complexity</b>: Logarithmic in the size of the container.
|
557
|
+
template <class M>
|
558
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
|
559
|
+
{ return this->base_t::insert_or_assign(const_iterator(), k, ::boost::forward<M>(obj)); }
|
560
|
+
|
561
|
+
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
|
562
|
+
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
|
563
|
+
//! as if by insert, constructing it from value_type(k, move(obj)).
|
564
|
+
//!
|
565
|
+
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
|
566
|
+
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
|
567
|
+
//! references obtained to that element before it was extracted become valid.
|
568
|
+
//!
|
569
|
+
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
|
570
|
+
//! took place. The iterator component is pointing at the element that was inserted or updated.
|
571
|
+
//!
|
572
|
+
//! <b>Complexity</b>: Logarithmic in the size of the container.
|
573
|
+
template <class M>
|
574
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
|
575
|
+
{ return this->base_t::insert_or_assign(const_iterator(), ::boost::move(k), ::boost::forward<M>(obj)); }
|
576
|
+
|
577
|
+
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
|
578
|
+
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
|
579
|
+
//! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
|
580
|
+
//! to the container as close as possible to the position just before hint.
|
581
|
+
//!
|
582
|
+
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
|
583
|
+
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
|
584
|
+
//! references obtained to that element before it was extracted become valid.
|
585
|
+
//!
|
586
|
+
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
|
587
|
+
//! took place. The iterator component is pointing at the element that was inserted or updated.
|
588
|
+
//!
|
589
|
+
//! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
|
590
|
+
//! the new element is inserted just before hint.
|
591
|
+
template <class M>
|
592
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
|
593
|
+
{ return this->base_t::insert_or_assign(hint, k, ::boost::forward<M>(obj)); }
|
594
|
+
|
595
|
+
//! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
|
596
|
+
//! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
|
597
|
+
//! as if by insert, constructing it from value_type(k, move(obj)) and the new element
|
598
|
+
//! to the container as close as possible to the position just before hint.
|
599
|
+
//!
|
600
|
+
//! No iterators or references are invalidated. If the insertion is successful, pointers and references
|
601
|
+
//! to the element obtained while it is held in the node handle are invalidated, and pointers and
|
602
|
+
//! references obtained to that element before it was extracted become valid.
|
603
|
+
//!
|
604
|
+
//! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
|
605
|
+
//! took place. The iterator component is pointing at the element that was inserted or updated.
|
606
|
+
//!
|
607
|
+
//! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
|
608
|
+
//! the new element is inserted just before hint.
|
609
|
+
template <class M>
|
610
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
|
611
|
+
{ return this->base_t::insert_or_assign(hint, ::boost::move(k), ::boost::forward<M>(obj)); }
|
612
|
+
|
613
|
+
//! <b>Returns</b>: A reference to the element whose key is equivalent to x.
|
493
614
|
//! Throws: An exception object of type out_of_range if no such element is present.
|
494
|
-
//! Complexity
|
615
|
+
//! <b>Complexity</b>: logarithmic.
|
495
616
|
T& at(const key_type& k)
|
496
617
|
{
|
497
618
|
iterator i = this->find(k);
|
@@ -501,9 +622,9 @@ class map
|
|
501
622
|
return i->second;
|
502
623
|
}
|
503
624
|
|
504
|
-
//! Returns
|
625
|
+
//! <b>Returns</b>: A reference to the element whose key is equivalent to x.
|
505
626
|
//! Throws: An exception object of type out_of_range if no such element is present.
|
506
|
-
//! Complexity
|
627
|
+
//! <b>Complexity</b>: logarithmic.
|
507
628
|
const T& at(const key_type& k) const
|
508
629
|
{
|
509
630
|
const_iterator i = this->find(k);
|
@@ -527,7 +648,7 @@ class map
|
|
527
648
|
//! points to the element with key equivalent to the key of x.
|
528
649
|
//!
|
529
650
|
//! <b>Complexity</b>: Logarithmic.
|
530
|
-
std::pair<iterator,bool> insert(const value_type& x)
|
651
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const value_type& x)
|
531
652
|
{ return this->base_t::insert_unique(x); }
|
532
653
|
|
533
654
|
//! <b>Effects</b>: Inserts a new value_type created from the pair if and only if
|
@@ -538,8 +659,8 @@ class map
|
|
538
659
|
//! points to the element with key equivalent to the key of x.
|
539
660
|
//!
|
540
661
|
//! <b>Complexity</b>: Logarithmic.
|
541
|
-
std::pair<iterator,bool> insert(const nonconst_value_type& x)
|
542
|
-
{ return this->
|
662
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const nonconst_value_type& x)
|
663
|
+
{ return this->try_emplace(x.first, x.second); }
|
543
664
|
|
544
665
|
//! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
|
545
666
|
//! only if there is no element in the container with key equivalent to the key of x.
|
@@ -549,8 +670,8 @@ class map
|
|
549
670
|
//! points to the element with key equivalent to the key of x.
|
550
671
|
//!
|
551
672
|
//! <b>Complexity</b>: Logarithmic.
|
552
|
-
std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
|
553
|
-
{ return this->
|
673
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
|
674
|
+
{ return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
|
554
675
|
|
555
676
|
//! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
|
556
677
|
//! only if there is no element in the container with key equivalent to the key of x.
|
@@ -560,8 +681,8 @@ class map
|
|
560
681
|
//! points to the element with key equivalent to the key of x.
|
561
682
|
//!
|
562
683
|
//! <b>Complexity</b>: Logarithmic.
|
563
|
-
std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
|
564
|
-
{ return this->
|
684
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
|
685
|
+
{ return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
|
565
686
|
|
566
687
|
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
|
567
688
|
//! no element in the container with key equivalent to the key of x.
|
@@ -571,7 +692,7 @@ class map
|
|
571
692
|
//! points to the element with key equivalent to the key of x.
|
572
693
|
//!
|
573
694
|
//! <b>Complexity</b>: Logarithmic.
|
574
|
-
std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
|
695
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
|
575
696
|
{ return this->base_t::insert_unique(boost::move(x)); }
|
576
697
|
|
577
698
|
//! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
|
@@ -583,7 +704,7 @@ class map
|
|
583
704
|
//!
|
584
705
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
585
706
|
//! is inserted right before p.
|
586
|
-
iterator insert(const_iterator p, const value_type& x)
|
707
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
|
587
708
|
{ return this->base_t::insert_unique(p, x); }
|
588
709
|
|
589
710
|
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
|
@@ -596,7 +717,7 @@ class map
|
|
596
717
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
597
718
|
//! is inserted right before p.
|
598
719
|
iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
|
599
|
-
{ return this->
|
720
|
+
{ return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
|
600
721
|
|
601
722
|
//! <b>Effects</b>: Move constructs a new value from x if and only if there is
|
602
723
|
//! no element in the container with key equivalent to the key of x.
|
@@ -608,7 +729,7 @@ class map
|
|
608
729
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
609
730
|
//! is inserted right before p.
|
610
731
|
iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
|
611
|
-
{ return this->
|
732
|
+
{ return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
|
612
733
|
|
613
734
|
//! <b>Effects</b>: Inserts a copy of x in the container.
|
614
735
|
//! p is a hint pointing to where the insert should start to search.
|
@@ -617,7 +738,7 @@ class map
|
|
617
738
|
//!
|
618
739
|
//! <b>Complexity</b>: Logarithmic.
|
619
740
|
iterator insert(const_iterator p, const nonconst_value_type& x)
|
620
|
-
{ return this->
|
741
|
+
{ return this->try_emplace(p, x.first, x.second); }
|
621
742
|
|
622
743
|
//! <b>Effects</b>: Inserts an element move constructed from x in the container.
|
623
744
|
//! p is a hint pointing to where the insert should start to search.
|
@@ -635,7 +756,7 @@ class map
|
|
635
756
|
//!
|
636
757
|
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
|
637
758
|
template <class InputIterator>
|
638
|
-
void insert(InputIterator first, InputIterator last)
|
759
|
+
BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
|
639
760
|
{ this->base_t::insert_unique(first, last); }
|
640
761
|
|
641
762
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
@@ -643,10 +764,42 @@ class map
|
|
643
764
|
//! if there is no element with key equivalent to the key of that element.
|
644
765
|
//!
|
645
766
|
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
|
646
|
-
void insert(std::initializer_list<value_type> il)
|
767
|
+
BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
|
647
768
|
{ this->base_t::insert_unique(il.begin(), il.end()); }
|
648
769
|
#endif
|
649
770
|
|
771
|
+
//! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
|
772
|
+
//!
|
773
|
+
//! <b>Effects</b>: If nh is empty, has no effect. Otherwise, inserts the element owned
|
774
|
+
//! by nh if and only if there is no element in the container with a key equivalent to nh.key().
|
775
|
+
//!
|
776
|
+
//! <b>Returns</b>: If nh is empty, insert_return_type.inserted is false, insert_return_type.position
|
777
|
+
//! is end(), and insert_return_type.node is empty. Otherwise if the insertion took place,
|
778
|
+
//! insert_return_type.inserted is true, insert_return_type.position points to the inserted element,
|
779
|
+
//! and insert_return_type.node is empty; if the insertion failed, insert_return_type.inserted is
|
780
|
+
//! false, insert_return_type.node has the previous value of nh, and insert_return_type.position
|
781
|
+
//! points to an element with a key equivalent to nh.key().
|
782
|
+
//!
|
783
|
+
//! <b>Complexity</b>: Logarithmic
|
784
|
+
insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
|
785
|
+
{
|
786
|
+
typename base_t::node_type n(boost::move(nh));
|
787
|
+
typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(boost::move(n)));
|
788
|
+
return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
|
789
|
+
}
|
790
|
+
|
791
|
+
//! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
|
792
|
+
//! to the position just prior to "hint".
|
793
|
+
//!
|
794
|
+
//! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
|
795
|
+
//! right before "hint".
|
796
|
+
insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
|
797
|
+
{
|
798
|
+
typename base_t::node_type n(boost::move(nh));
|
799
|
+
typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(hint, boost::move(n)));
|
800
|
+
return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
|
801
|
+
}
|
802
|
+
|
650
803
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
651
804
|
|
652
805
|
//! <b>Effects</b>: Inserts an object x of type T constructed with
|
@@ -661,7 +814,7 @@ class map
|
|
661
814
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
662
815
|
//! is inserted right before p.
|
663
816
|
template <class... Args>
|
664
|
-
std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
|
817
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
|
665
818
|
{ return this->base_t::emplace_unique(boost::forward<Args>(args)...); }
|
666
819
|
|
667
820
|
//! <b>Effects</b>: Inserts an object of type T constructed with
|
@@ -675,19 +828,95 @@ class map
|
|
675
828
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
676
829
|
//! is inserted right before p.
|
677
830
|
template <class... Args>
|
678
|
-
iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
831
|
+
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
679
832
|
{ return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
|
680
833
|
|
834
|
+
//! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
|
835
|
+
//! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
|
836
|
+
//!
|
837
|
+
//! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
|
838
|
+
//! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
|
839
|
+
//! forward_as_tuple(forward<Args>(args)...).
|
840
|
+
//!
|
841
|
+
//! <b>Returns</b>: The bool component of the returned pair is true if and only if the
|
842
|
+
//! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
|
843
|
+
//!
|
844
|
+
//! <b>Complexity</b>: Logarithmic.
|
845
|
+
template <class... Args>
|
846
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
|
847
|
+
{ return this->base_t::try_emplace(const_iterator(), k, boost::forward<Args>(args)...); }
|
848
|
+
|
849
|
+
//! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
|
850
|
+
//! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
|
851
|
+
//!
|
852
|
+
//! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
|
853
|
+
//! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
|
854
|
+
//! forward_as_tuple(forward<Args>(args)...).
|
855
|
+
//!
|
856
|
+
//! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
|
857
|
+
//!
|
858
|
+
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
|
859
|
+
//! is inserted right before p.
|
860
|
+
template <class... Args>
|
861
|
+
BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
|
862
|
+
{ return this->base_t::try_emplace(hint, k, boost::forward<Args>(args)...).first; }
|
863
|
+
|
864
|
+
//! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
|
865
|
+
//! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
|
866
|
+
//!
|
867
|
+
//! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
|
868
|
+
//! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
|
869
|
+
//! forward_as_tuple(forward<Args>(args)...).
|
870
|
+
//!
|
871
|
+
//! <b>Returns</b>: The bool component of the returned pair is true if and only if the
|
872
|
+
//! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
|
873
|
+
//!
|
874
|
+
//! <b>Complexity</b>: Logarithmic.
|
875
|
+
template <class... Args>
|
876
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
|
877
|
+
{ return this->base_t::try_emplace(const_iterator(), boost::move(k), boost::forward<Args>(args)...); }
|
878
|
+
|
879
|
+
//! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
|
880
|
+
//! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
|
881
|
+
//!
|
882
|
+
//! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
|
883
|
+
//! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
|
884
|
+
//! forward_as_tuple(forward<Args>(args)...).
|
885
|
+
//!
|
886
|
+
//! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
|
887
|
+
//!
|
888
|
+
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
|
889
|
+
//! is inserted right before p.
|
890
|
+
template <class... Args>
|
891
|
+
BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
|
892
|
+
{ return this->base_t::try_emplace(hint, boost::move(k), boost::forward<Args>(args)...).first; }
|
893
|
+
|
681
894
|
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
682
895
|
|
683
896
|
#define BOOST_CONTAINER_MAP_EMPLACE_CODE(N) \
|
684
897
|
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
685
|
-
std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
|
898
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
|
686
899
|
{ return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\
|
687
900
|
\
|
688
901
|
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
689
|
-
iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
902
|
+
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
690
903
|
{ return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
904
|
+
\
|
905
|
+
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
906
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
907
|
+
{ return this->base_t::try_emplace(const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
908
|
+
\
|
909
|
+
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
910
|
+
BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
911
|
+
{ return this->base_t::try_emplace(hint, k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
|
912
|
+
\
|
913
|
+
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
914
|
+
BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
915
|
+
{ return this->base_t::try_emplace(const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
916
|
+
\
|
917
|
+
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
918
|
+
BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
919
|
+
{ return this->base_t::try_emplace(hint, boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
|
691
920
|
//
|
692
921
|
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MAP_EMPLACE_CODE)
|
693
922
|
#undef BOOST_CONTAINER_MAP_EMPLACE_CODE
|
@@ -719,6 +948,74 @@ class map
|
|
719
948
|
//! <b>Complexity</b>: log(size())+N where N is the distance from first to last.
|
720
949
|
iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW;
|
721
950
|
|
951
|
+
#endif
|
952
|
+
|
953
|
+
//! <b>Effects</b>: Removes the first element in the container with key equivalent to k.
|
954
|
+
//!
|
955
|
+
//! <b>Returns</b>: A node_type owning the element if found, otherwise an empty node_type.
|
956
|
+
//!
|
957
|
+
//! <b>Complexity</b>: log(a.size()).
|
958
|
+
node_type extract(const key_type& k)
|
959
|
+
{
|
960
|
+
typename base_t::node_type base_nh(this->base_t::extract(k));
|
961
|
+
node_type nh(boost::move(base_nh));
|
962
|
+
return BOOST_MOVE_RET(node_type, nh);
|
963
|
+
}
|
964
|
+
|
965
|
+
//! <b>Effects</b>: Removes the element pointed to by "position".
|
966
|
+
//!
|
967
|
+
//! <b>Returns</b>: A node_type owning the element, otherwise an empty node_type.
|
968
|
+
//!
|
969
|
+
//! <b>Complexity</b>: Amortized constant.
|
970
|
+
node_type extract(const_iterator position)
|
971
|
+
{
|
972
|
+
typename base_t::node_type base_nh(this->base_t::extract(position));
|
973
|
+
node_type nh(boost::move(base_nh));
|
974
|
+
return BOOST_MOVE_RET(node_type, nh);
|
975
|
+
}
|
976
|
+
|
977
|
+
//! <b>Requires</b>: this->get_allocator() == source.get_allocator().
|
978
|
+
//!
|
979
|
+
//! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
|
980
|
+
//! the comparison object of *this. If there is an element in a with key equivalent to the
|
981
|
+
//! key of an element from source, then that element is not extracted from source.
|
982
|
+
//!
|
983
|
+
//! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
|
984
|
+
//! to those same elements but as members of *this. Iterators referring to the transferred
|
985
|
+
//! elements will continue to refer to their elements, but they now behave as iterators into *this,
|
986
|
+
//! not into source.
|
987
|
+
//!
|
988
|
+
//! <b>Throws</b>: Nothing unless the comparison object throws.
|
989
|
+
//!
|
990
|
+
//! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
|
991
|
+
template<class C2>
|
992
|
+
BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
|
993
|
+
{
|
994
|
+
typedef container_detail::tree
|
995
|
+
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
996
|
+
this->merge_unique(static_cast<base2_t&>(source));
|
997
|
+
}
|
998
|
+
|
999
|
+
//! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
|
1000
|
+
template<class C2>
|
1001
|
+
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
|
1002
|
+
{ return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
|
1003
|
+
|
1004
|
+
//! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
|
1005
|
+
template<class C2>
|
1006
|
+
BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
|
1007
|
+
{
|
1008
|
+
typedef container_detail::tree
|
1009
|
+
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
1010
|
+
this->base_t::merge_unique(static_cast<base2_t&>(source));
|
1011
|
+
}
|
1012
|
+
|
1013
|
+
//! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
|
1014
|
+
template<class C2>
|
1015
|
+
BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
|
1016
|
+
{ return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
|
1017
|
+
|
1018
|
+
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
722
1019
|
//! <b>Effects</b>: Swaps the contents of *this and x.
|
723
1020
|
//!
|
724
1021
|
//! <b>Throws</b>: Nothing.
|
@@ -764,7 +1061,7 @@ class map
|
|
764
1061
|
//! <b>Returns</b>: The number of elements with key equivalent to x.
|
765
1062
|
//!
|
766
1063
|
//! <b>Complexity</b>: log(size())+count(k)
|
767
|
-
size_type count(const key_type& x) const
|
1064
|
+
BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
|
768
1065
|
{ return static_cast<size_type>(this->find(x) != this->cend()); }
|
769
1066
|
|
770
1067
|
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
@@ -847,33 +1144,11 @@ class map
|
|
847
1144
|
|
848
1145
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
849
1146
|
private:
|
850
|
-
|
851
|
-
|
852
|
-
//we can optimize this
|
853
|
-
iterator i = this->lower_bound(k);
|
854
|
-
// i->first is greater than or equivalent to k.
|
855
|
-
if (i == this->end() || this->key_comp()(k, (*i).first)){
|
856
|
-
container_detail::value_init<mapped_type> m;
|
857
|
-
movable_value_type val(k, boost::move(m.m_t));
|
858
|
-
i = insert(i, boost::move(val));
|
859
|
-
}
|
860
|
-
return (*i).second;
|
861
|
-
}
|
862
|
-
|
863
|
-
mapped_type& priv_subscript(BOOST_RV_REF(key_type) mk)
|
1147
|
+
template<class KeyConvertible>
|
1148
|
+
BOOST_CONTAINER_FORCEINLINE mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k)
|
864
1149
|
{
|
865
|
-
|
866
|
-
//we can optimize this
|
867
|
-
iterator i = this->lower_bound(k);
|
868
|
-
// i->first is greater than or equivalent to k.
|
869
|
-
if (i == this->end() || this->key_comp()(k, (*i).first)){
|
870
|
-
container_detail::value_init<mapped_type> m;
|
871
|
-
movable_value_type val(boost::move(k), boost::move(m.m_t));
|
872
|
-
i = insert(i, boost::move(val));
|
873
|
-
}
|
874
|
-
return (*i).second;
|
1150
|
+
return this->try_emplace(boost::forward<KeyConvertible>(k)).first->second;
|
875
1151
|
}
|
876
|
-
|
877
1152
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
878
1153
|
};
|
879
1154
|
|
@@ -913,34 +1188,33 @@ namespace container {
|
|
913
1188
|
//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
|
914
1189
|
//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
|
915
1190
|
//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
|
916
|
-
//! \tparam
|
1191
|
+
//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
|
917
1192
|
template < class Key, class T, class Compare = std::less<Key>
|
918
|
-
, class Allocator = new_allocator< std::pair< const Key, T> >, class
|
1193
|
+
, class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults>
|
919
1194
|
#else
|
920
|
-
template <class Key, class T, class Compare, class Allocator, class
|
1195
|
+
template <class Key, class T, class Compare, class Allocator, class Options>
|
921
1196
|
#endif
|
922
1197
|
class multimap
|
923
1198
|
///@cond
|
924
1199
|
: public container_detail::tree
|
925
|
-
<
|
926
|
-
, container_detail::select1st<
|
927
|
-
, Compare, Allocator,
|
1200
|
+
< std::pair<const Key, T>
|
1201
|
+
, container_detail::select1st<Key>
|
1202
|
+
, Compare, Allocator, Options>
|
928
1203
|
///@endcond
|
929
1204
|
{
|
930
1205
|
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
931
1206
|
private:
|
932
1207
|
BOOST_COPYABLE_AND_MOVABLE(multimap)
|
933
1208
|
|
934
|
-
typedef
|
1209
|
+
typedef container_detail::select1st<Key> select_1st_t;
|
1210
|
+
typedef std::pair<const Key, T> value_type_impl;
|
935
1211
|
typedef container_detail::tree
|
936
|
-
<
|
937
|
-
typedef container_detail::pair <Key, T>
|
938
|
-
typedef
|
939
|
-
< Key, value_type_impl, Compare, container_detail::select1st<value_type_impl>
|
940
|
-
> value_compare_impl;
|
1212
|
+
<value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
|
1213
|
+
typedef container_detail::pair <Key, T> movable_value_type_impl;
|
1214
|
+
typedef typename base_t::value_compare value_compare_impl;
|
941
1215
|
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
942
1216
|
|
943
|
-
typedef ::boost::container::allocator_traits<Allocator>
|
1217
|
+
typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
|
944
1218
|
|
945
1219
|
public:
|
946
1220
|
//////////////////////////////////////////////
|
@@ -968,6 +1242,12 @@ class multimap
|
|
968
1242
|
typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
|
969
1243
|
typedef std::pair<key_type, mapped_type> nonconst_value_type;
|
970
1244
|
typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
|
1245
|
+
typedef BOOST_CONTAINER_IMPDEF(node_handle<
|
1246
|
+
typename base_t::node_type::container_node_type
|
1247
|
+
BOOST_MOVE_I value_type
|
1248
|
+
BOOST_MOVE_I allocator_type
|
1249
|
+
BOOST_MOVE_I pair_key_mapped_of_value
|
1250
|
+
<key_type BOOST_MOVE_I mapped_type> >) node_type;
|
971
1251
|
|
972
1252
|
//////////////////////////////////////////////
|
973
1253
|
//
|
@@ -978,7 +1258,9 @@ class multimap
|
|
978
1258
|
//! <b>Effects</b>: Default constructs an empty multimap.
|
979
1259
|
//!
|
980
1260
|
//! <b>Complexity</b>: Constant.
|
981
|
-
|
1261
|
+
BOOST_CONTAINER_FORCEINLINE
|
1262
|
+
multimap() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value &&
|
1263
|
+
container_detail::is_nothrow_default_constructible<Compare>::value)
|
982
1264
|
: base_t()
|
983
1265
|
{
|
984
1266
|
//A type must be std::pair<CONST Key, T>
|
@@ -988,6 +1270,7 @@ class multimap
|
|
988
1270
|
//! <b>Effects</b>: Constructs an empty multimap using the specified allocator.
|
989
1271
|
//!
|
990
1272
|
//! <b>Complexity</b>: Constant.
|
1273
|
+
BOOST_CONTAINER_FORCEINLINE
|
991
1274
|
explicit multimap(const Compare& comp, const allocator_type& a = allocator_type())
|
992
1275
|
: base_t(comp, a)
|
993
1276
|
{
|
@@ -999,6 +1282,7 @@ class multimap
|
|
999
1282
|
//! object and allocator.
|
1000
1283
|
//!
|
1001
1284
|
//! <b>Complexity</b>: Constant.
|
1285
|
+
BOOST_CONTAINER_FORCEINLINE
|
1002
1286
|
explicit multimap(const allocator_type& a)
|
1003
1287
|
: base_t(a)
|
1004
1288
|
{
|
@@ -1012,6 +1296,7 @@ class multimap
|
|
1012
1296
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
1013
1297
|
//! comp and otherwise N logN, where N is last - first.
|
1014
1298
|
template <class InputIterator>
|
1299
|
+
BOOST_CONTAINER_FORCEINLINE
|
1015
1300
|
multimap(InputIterator first, InputIterator last,
|
1016
1301
|
const Compare& comp = Compare(),
|
1017
1302
|
const allocator_type& a = allocator_type())
|
@@ -1027,7 +1312,7 @@ class multimap
|
|
1027
1312
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
1028
1313
|
//! comp and otherwise N logN, where N is last - first.
|
1029
1314
|
template <class InputIterator>
|
1030
|
-
multimap(InputIterator first, InputIterator last, const allocator_type& a)
|
1315
|
+
BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a)
|
1031
1316
|
: base_t(false, first, last, Compare(), a)
|
1032
1317
|
{
|
1033
1318
|
//A type must be std::pair<CONST Key, T>
|
@@ -1044,7 +1329,7 @@ class multimap
|
|
1044
1329
|
//!
|
1045
1330
|
//! <b>Note</b>: Non-standard extension.
|
1046
1331
|
template <class InputIterator>
|
1047
|
-
multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp = Compare(),
|
1332
|
+
BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp = Compare(),
|
1048
1333
|
const allocator_type& a = allocator_type())
|
1049
1334
|
: base_t(ordered_range, first, last, comp, a)
|
1050
1335
|
{}
|
@@ -1055,6 +1340,7 @@ class multimap
|
|
1055
1340
|
//!
|
1056
1341
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
1057
1342
|
//! comp and otherwise N logN, where N is il.first() - il.end().
|
1343
|
+
BOOST_CONTAINER_FORCEINLINE
|
1058
1344
|
multimap(std::initializer_list<value_type> il, const Compare& comp = Compare(),
|
1059
1345
|
const allocator_type& a = allocator_type())
|
1060
1346
|
: base_t(false, il.begin(), il.end(), comp, a)
|
@@ -1068,6 +1354,7 @@ class multimap
|
|
1068
1354
|
//!
|
1069
1355
|
//! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
|
1070
1356
|
//! comp and otherwise N logN, where N is il.first() - il.end().
|
1357
|
+
BOOST_CONTAINER_FORCEINLINE
|
1071
1358
|
multimap(std::initializer_list<value_type> il, const allocator_type& a)
|
1072
1359
|
: base_t(false, il.begin(), il.end(), Compare(), a)
|
1073
1360
|
{
|
@@ -1084,6 +1371,7 @@ class multimap
|
|
1084
1371
|
//! <b>Complexity</b>: Linear in N.
|
1085
1372
|
//!
|
1086
1373
|
//! <b>Note</b>: Non-standard extension.
|
1374
|
+
BOOST_CONTAINER_FORCEINLINE
|
1087
1375
|
multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp = Compare(),
|
1088
1376
|
const allocator_type& a = allocator_type())
|
1089
1377
|
: base_t(ordered_range, il.begin(), il.end(), comp, a)
|
@@ -1096,7 +1384,7 @@ class multimap
|
|
1096
1384
|
//! <b>Effects</b>: Copy constructs a multimap.
|
1097
1385
|
//!
|
1098
1386
|
//! <b>Complexity</b>: Linear in x.size().
|
1099
|
-
multimap(const multimap& x)
|
1387
|
+
BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x)
|
1100
1388
|
: base_t(static_cast<const base_t&>(x))
|
1101
1389
|
{
|
1102
1390
|
//A type must be std::pair<CONST Key, T>
|
@@ -1108,7 +1396,8 @@ class multimap
|
|
1108
1396
|
//! <b>Complexity</b>: Constant.
|
1109
1397
|
//!
|
1110
1398
|
//! <b>Postcondition</b>: x is emptied.
|
1111
|
-
multimap(BOOST_RV_REF(multimap) x)
|
1399
|
+
BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x)
|
1400
|
+
BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible<Compare>::value)
|
1112
1401
|
: base_t(BOOST_MOVE_BASE(base_t, x))
|
1113
1402
|
{
|
1114
1403
|
//A type must be std::pair<CONST Key, T>
|
@@ -1118,7 +1407,7 @@ class multimap
|
|
1118
1407
|
//! <b>Effects</b>: Copy constructs a multimap.
|
1119
1408
|
//!
|
1120
1409
|
//! <b>Complexity</b>: Linear in x.size().
|
1121
|
-
multimap(const multimap& x, const allocator_type &a)
|
1410
|
+
BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a)
|
1122
1411
|
: base_t(static_cast<const base_t&>(x), a)
|
1123
1412
|
{
|
1124
1413
|
//A type must be std::pair<CONST Key, T>
|
@@ -1130,7 +1419,7 @@ class multimap
|
|
1130
1419
|
//! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
|
1131
1420
|
//!
|
1132
1421
|
//! <b>Postcondition</b>: x is emptied.
|
1133
|
-
multimap(BOOST_RV_REF(multimap) x, const allocator_type &a)
|
1422
|
+
BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a)
|
1134
1423
|
: base_t(BOOST_MOVE_BASE(base_t, x), a)
|
1135
1424
|
{
|
1136
1425
|
//A type must be std::pair<CONST Key, T>
|
@@ -1140,21 +1429,22 @@ class multimap
|
|
1140
1429
|
//! <b>Effects</b>: Makes *this a copy of x.
|
1141
1430
|
//!
|
1142
1431
|
//! <b>Complexity</b>: Linear in x.size().
|
1143
|
-
multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x)
|
1432
|
+
BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x)
|
1144
1433
|
{ return static_cast<multimap&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
|
1145
1434
|
|
1146
1435
|
//! <b>Effects</b>: this->swap(x.get()).
|
1147
1436
|
//!
|
1148
1437
|
//! <b>Complexity</b>: Constant.
|
1149
|
-
multimap& operator=(BOOST_RV_REF(multimap) x)
|
1150
|
-
BOOST_NOEXCEPT_IF(
|
1151
|
-
|
1438
|
+
BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_RV_REF(multimap) x)
|
1439
|
+
BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
|
1440
|
+
allocator_traits_type::is_always_equal::value) &&
|
1441
|
+
boost::container::container_detail::is_nothrow_move_assignable<Compare>::value)
|
1152
1442
|
{ return static_cast<multimap&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
|
1153
1443
|
|
1154
1444
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1155
1445
|
//! <b>Effects</b>: Assign content of il to *this.
|
1156
1446
|
//!
|
1157
|
-
multimap& operator=(std::initializer_list<value_type> il)
|
1447
|
+
BOOST_CONTAINER_FORCEINLINE multimap& operator=(std::initializer_list<value_type> il)
|
1158
1448
|
{
|
1159
1449
|
this->clear();
|
1160
1450
|
insert(il.begin(), il.end());
|
@@ -1232,7 +1522,7 @@ class multimap
|
|
1232
1522
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
1233
1523
|
//! is inserted right before p.
|
1234
1524
|
template <class... Args>
|
1235
|
-
iterator emplace(BOOST_FWD_REF(Args)... args)
|
1525
|
+
BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
|
1236
1526
|
{ return this->base_t::emplace_equal(boost::forward<Args>(args)...); }
|
1237
1527
|
|
1238
1528
|
//! <b>Effects</b>: Inserts an object of type T constructed with
|
@@ -1245,18 +1535,18 @@ class multimap
|
|
1245
1535
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
1246
1536
|
//! is inserted right before p.
|
1247
1537
|
template <class... Args>
|
1248
|
-
iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
1538
|
+
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
|
1249
1539
|
{ return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
|
1250
1540
|
|
1251
1541
|
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
1252
1542
|
|
1253
1543
|
#define BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE(N) \
|
1254
1544
|
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
1255
|
-
iterator emplace(BOOST_MOVE_UREF##N)\
|
1545
|
+
BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
|
1256
1546
|
{ return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\
|
1257
1547
|
\
|
1258
1548
|
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
1259
|
-
iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
1549
|
+
BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
1260
1550
|
{ return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
|
1261
1551
|
//
|
1262
1552
|
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE)
|
@@ -1268,29 +1558,29 @@ class multimap
|
|
1268
1558
|
//! newly inserted element.
|
1269
1559
|
//!
|
1270
1560
|
//! <b>Complexity</b>: Logarithmic.
|
1271
|
-
iterator insert(const value_type& x)
|
1561
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x)
|
1272
1562
|
{ return this->base_t::insert_equal(x); }
|
1273
1563
|
|
1274
1564
|
//! <b>Effects</b>: Inserts a new value constructed from x and returns
|
1275
1565
|
//! the iterator pointing to the newly inserted element.
|
1276
1566
|
//!
|
1277
1567
|
//! <b>Complexity</b>: Logarithmic.
|
1278
|
-
iterator insert(const nonconst_value_type& x)
|
1279
|
-
{ return this->base_t::
|
1568
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(const nonconst_value_type& x)
|
1569
|
+
{ return this->base_t::emplace_equal(x); }
|
1280
1570
|
|
1281
1571
|
//! <b>Effects</b>: Inserts a new value move-constructed from x and returns
|
1282
1572
|
//! the iterator pointing to the newly inserted element.
|
1283
1573
|
//!
|
1284
1574
|
//! <b>Complexity</b>: Logarithmic.
|
1285
|
-
iterator insert(BOOST_RV_REF(nonconst_value_type) x)
|
1286
|
-
{ return this->base_t::
|
1575
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(nonconst_value_type) x)
|
1576
|
+
{ return this->base_t::emplace_equal(boost::move(x)); }
|
1287
1577
|
|
1288
1578
|
//! <b>Effects</b>: Inserts a new value move-constructed from x and returns
|
1289
1579
|
//! the iterator pointing to the newly inserted element.
|
1290
1580
|
//!
|
1291
1581
|
//! <b>Complexity</b>: Logarithmic.
|
1292
1582
|
iterator insert(BOOST_RV_REF(movable_value_type) x)
|
1293
|
-
{ return this->base_t::
|
1583
|
+
{ return this->base_t::emplace_equal(boost::move(x)); }
|
1294
1584
|
|
1295
1585
|
//! <b>Effects</b>: Inserts a copy of x in the container.
|
1296
1586
|
//! p is a hint pointing to where the insert should start to search.
|
@@ -1300,7 +1590,7 @@ class multimap
|
|
1300
1590
|
//!
|
1301
1591
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
1302
1592
|
//! is inserted right before p.
|
1303
|
-
iterator insert(const_iterator p, const value_type& x)
|
1593
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
|
1304
1594
|
{ return this->base_t::insert_equal(p, x); }
|
1305
1595
|
|
1306
1596
|
//! <b>Effects</b>: Inserts a new value constructed from x in the container.
|
@@ -1311,8 +1601,8 @@ class multimap
|
|
1311
1601
|
//!
|
1312
1602
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
1313
1603
|
//! is inserted right before p.
|
1314
|
-
iterator insert(const_iterator p, const nonconst_value_type& x)
|
1315
|
-
{ return this->base_t::
|
1604
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const nonconst_value_type& x)
|
1605
|
+
{ return this->base_t::emplace_hint_equal(p, x); }
|
1316
1606
|
|
1317
1607
|
//! <b>Effects</b>: Inserts a new value move constructed from x in the container.
|
1318
1608
|
//! p is a hint pointing to where the insert should start to search.
|
@@ -1322,8 +1612,8 @@ class multimap
|
|
1322
1612
|
//!
|
1323
1613
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
1324
1614
|
//! is inserted right before p.
|
1325
|
-
iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
|
1326
|
-
{ return this->base_t::
|
1615
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
|
1616
|
+
{ return this->base_t::emplace_hint_equal(p, boost::move(x)); }
|
1327
1617
|
|
1328
1618
|
//! <b>Effects</b>: Inserts a new value move constructed from x in the container.
|
1329
1619
|
//! p is a hint pointing to where the insert should start to search.
|
@@ -1333,8 +1623,8 @@ class multimap
|
|
1333
1623
|
//!
|
1334
1624
|
//! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
|
1335
1625
|
//! is inserted right before p.
|
1336
|
-
iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
|
1337
|
-
{ return this->base_t::
|
1626
|
+
BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
|
1627
|
+
{ return this->base_t::emplace_hint_equal(p, boost::move(x)); }
|
1338
1628
|
|
1339
1629
|
//! <b>Requires</b>: first, last are not iterators into *this.
|
1340
1630
|
//!
|
@@ -1342,17 +1632,42 @@ class multimap
|
|
1342
1632
|
//!
|
1343
1633
|
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
|
1344
1634
|
template <class InputIterator>
|
1345
|
-
void insert(InputIterator first, InputIterator last)
|
1635
|
+
BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
|
1346
1636
|
{ this->base_t::insert_equal(first, last); }
|
1347
1637
|
|
1348
1638
|
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1349
1639
|
//! <b>Effects</b>: inserts each element from the range [il.begin(), il.end().
|
1350
1640
|
//!
|
1351
1641
|
//! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
|
1352
|
-
void insert(std::initializer_list<value_type> il)
|
1642
|
+
BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
|
1353
1643
|
{ this->base_t::insert_equal(il.begin(), il.end()); }
|
1354
1644
|
#endif
|
1355
1645
|
|
1646
|
+
//! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
|
1647
|
+
//!
|
1648
|
+
//! <b>Effects/Returns</b>: If nh is empty, has no effect and returns end(). Otherwise, inserts
|
1649
|
+
//! the element owned by nh and returns an iterator pointing to the newly inserted element.
|
1650
|
+
//! If a range containing elements with keys equivalent to nh.key() exists,
|
1651
|
+
//! the element is inserted at the end of that range. nh is always emptied.
|
1652
|
+
//!
|
1653
|
+
//! <b>Complexity</b>: Logarithmic
|
1654
|
+
iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
|
1655
|
+
{
|
1656
|
+
typename base_t::node_type n(boost::move(nh));
|
1657
|
+
return this->base_t::insert_equal_node(boost::move(n));
|
1658
|
+
}
|
1659
|
+
|
1660
|
+
//! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
|
1661
|
+
//! to the position just prior to "hint".
|
1662
|
+
//!
|
1663
|
+
//! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
|
1664
|
+
//! right before "hint".
|
1665
|
+
iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
|
1666
|
+
{
|
1667
|
+
typename base_t::node_type n(boost::move(nh));
|
1668
|
+
return this->base_t::insert_equal_node(hint, boost::move(n));
|
1669
|
+
}
|
1670
|
+
|
1356
1671
|
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1357
1672
|
|
1358
1673
|
//! @copydoc ::boost::container::set::erase(const_iterator)
|
@@ -1363,7 +1678,63 @@ class multimap
|
|
1363
1678
|
|
1364
1679
|
//! @copydoc ::boost::container::set::erase(const_iterator,const_iterator)
|
1365
1680
|
iterator erase(const_iterator first, const_iterator last);
|
1681
|
+
#endif
|
1366
1682
|
|
1683
|
+
//! @copydoc ::boost::container::map::extract(const key_type&)
|
1684
|
+
node_type extract(const key_type& k)
|
1685
|
+
{
|
1686
|
+
typename base_t::node_type base_nh(this->base_t::extract(k));
|
1687
|
+
return node_type(boost::move(base_nh));
|
1688
|
+
}
|
1689
|
+
|
1690
|
+
//! @copydoc ::boost::container::map::extract(const_iterator)
|
1691
|
+
node_type extract(const_iterator position)
|
1692
|
+
{
|
1693
|
+
typename base_t::node_type base_nh(this->base_t::extract(position));
|
1694
|
+
return node_type (boost::move(base_nh));
|
1695
|
+
}
|
1696
|
+
|
1697
|
+
//! <b>Requires</b>: this->get_allocator() == source.get_allocator().
|
1698
|
+
//!
|
1699
|
+
//! <b>Effects</b>: Extracts each element in source and insert it into a using
|
1700
|
+
//! the comparison object of *this.
|
1701
|
+
//!
|
1702
|
+
//! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
|
1703
|
+
//! to those same elements but as members of *this. Iterators referring to the transferred
|
1704
|
+
//! elements will continue to refer to their elements, but they now behave as iterators into *this,
|
1705
|
+
//! not into source.
|
1706
|
+
//!
|
1707
|
+
//! <b>Throws</b>: Nothing unless the comparison object throws.
|
1708
|
+
//!
|
1709
|
+
//! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
|
1710
|
+
template<class C2>
|
1711
|
+
void merge(multimap<Key, T, C2, Allocator, Options>& source)
|
1712
|
+
{
|
1713
|
+
typedef container_detail::tree
|
1714
|
+
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
1715
|
+
this->base_t::merge_equal(static_cast<base2_t&>(source));
|
1716
|
+
}
|
1717
|
+
|
1718
|
+
//! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
|
1719
|
+
template<class C2>
|
1720
|
+
void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
|
1721
|
+
{ return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
|
1722
|
+
|
1723
|
+
//! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
|
1724
|
+
template<class C2>
|
1725
|
+
void merge(map<Key, T, C2, Allocator, Options>& source)
|
1726
|
+
{
|
1727
|
+
typedef container_detail::tree
|
1728
|
+
<value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
|
1729
|
+
this->base_t::merge_equal(static_cast<base2_t&>(source));
|
1730
|
+
}
|
1731
|
+
|
1732
|
+
//! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
|
1733
|
+
template<class C2>
|
1734
|
+
void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
|
1735
|
+
{ return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
|
1736
|
+
|
1737
|
+
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1367
1738
|
//! @copydoc ::boost::container::set::swap
|
1368
1739
|
void swap(multiset& x)
|
1369
1740
|
BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
|