passenger 5.0.24 → 5.0.25
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 +8 -18
- data/CHANGELOG +20 -0
- data/build/cplusplus_support.rb +3 -3
- data/build/cxx_dependency_map.rb +148 -96
- data/build/cxx_tests.rb +24 -12
- data/build/packaging.rb +1 -2
- data/dev/copy_boost_headers +32 -9
- data/resources/templates/standalone/config.erb +2 -0
- data/resources/templates/standalone/footer.erb +3 -0
- data/resources/templates/standalone/server.erb +7 -0
- data/src/agent/Core/ApplicationPool/Pool/Miscellaneous.cpp +2 -2
- data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -0
- data/src/agent/Core/UnionStation/Transaction.h +1 -15
- data/src/agent/README.md +15 -3
- data/src/agent/UstRouter/Controller.h +95 -90
- data/src/agent/UstRouter/FileSink.h +3 -2
- data/src/agent/UstRouter/LogSink.h +5 -6
- data/src/agent/UstRouter/RemoteSender.h +41 -12
- data/src/agent/UstRouter/RemoteSink.h +3 -2
- data/src/agent/UstRouter/Transaction.h +198 -66
- data/src/apache2_module/Configuration.cpp +57 -2
- data/src/apache2_module/Configuration.h +3 -1
- data/src/apache2_module/Configuration.hpp +3 -1
- data/src/apache2_module/Hooks.cpp +4 -2
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/MemoryKit/palloc.h +1 -0
- data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +1 -0
- data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +4 -3
- data/src/cxx_supportlib/ServerKit/Server.h +1 -0
- data/src/cxx_supportlib/Utils/BufferedIO.h +21 -4
- data/src/cxx_supportlib/Utils/IOUtils.cpp +62 -12
- data/src/cxx_supportlib/Utils/StrIntUtils.cpp +3 -3
- data/src/cxx_supportlib/Utils/StrIntUtils.h +2 -2
- data/src/cxx_supportlib/WatchdogLauncher.cpp +13 -1
- data/src/cxx_supportlib/WatchdogLauncher.h +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/classification.hpp +312 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/concept.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/classification.hpp +353 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_format.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_format_all.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_format_store.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/find_iterator.hpp +87 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/finder.hpp +1 -8
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/finder_regex.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/formatter_regex.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/predicate.hpp +77 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/trim.hpp +95 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/detail/util.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/erase.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/find.hpp +334 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/find_format.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/find_iterator.hpp +388 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/finder.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/formatter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/iter_find.hpp +193 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/join.hpp +145 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/predicate.hpp +475 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/predicate_facade.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/regex.hpp +646 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/regex_find_format.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/replace.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/sequence_traits.hpp +0 -73
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/split.hpp +163 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/list_traits.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/rope_traits.hpp +81 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/slist_traits.hpp +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std/string_traits.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/std_containers_traits.hpp +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim.hpp +398 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/trim_all.hpp +217 -0
- data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/address.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/align.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/aligned_storage.hpp +1 -164
- data/src/cxx_supportlib/vendor-modified/boost/assert.hpp +33 -84
- data/src/cxx_supportlib/vendor-modified/boost/atomic.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic.hpp +83 -231
- data/src/cxx_supportlib/vendor-modified/boost/atomic/atomic_flag.hpp +33 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/capabilities.hpp +161 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_flag.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_template.hpp +774 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_alpha.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_arm.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_atomic.hpp +134 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_ppc.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_sparc.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_sync.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_linux_arm.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_arm.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_x86.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +57 -36
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/int_sizes.hpp +140 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +297 -16
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/link.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/lockpool.hpp +30 -76
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations_fwd.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/operations_lockfree.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_cas_based.hpp +105 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +161 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_extending_cas_based.hpp +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_alpha.hpp +876 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm.hpp +973 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +395 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc.hpp +802 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sparc.hpp +240 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sync.hpp +270 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +514 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +616 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_linux_arm.hpp +178 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_arm.hpp +824 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_common.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_x86.hpp +928 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/pause.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +91 -32
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/storage_type.hpp +280 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/fences.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind.hpp +18 -1
- data/src/cxx_supportlib/vendor-modified/boost/bind/apply.hpp +74 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/arg.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +507 -2
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind_mf_cc.hpp +214 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/make_adaptable.hpp +187 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/mem_fn_vw.hpp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/bind/placeholders.hpp +29 -36
- data/src/cxx_supportlib/vendor-modified/boost/bind/protect.hpp +304 -0
- data/src/cxx_supportlib/vendor-modified/boost/checked_delete.hpp +13 -65
- data/src/cxx_supportlib/vendor-modified/boost/chrono/config.hpp +9 -13
- data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +10 -4
- data/src/cxx_supportlib/vendor-modified/boost/concept/assert.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/concept/detail/concept_def.hpp +0 -17
- data/src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/concept/usage.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/concept_check.hpp +25 -26
- data/src/cxx_supportlib/vendor-modified/boost/config.hpp +9 -12
- data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +17 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +36 -6
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +135 -14
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +41 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +48 -9
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +33 -5
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +36 -16
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +121 -87
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +39 -5
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +13 -9
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +327 -64
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +44 -10
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +38 -4
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +0 -12
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +36 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pgi.hpp +37 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +63 -23
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +44 -13
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +102 -128
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +258 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/cloudabi.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/haiku.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/linux.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/macos.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/solaris.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/select_compiler_config.hpp +43 -7
- data/src/cxx_supportlib/vendor-modified/boost/config/select_platform_config.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/select_stdlib_config.hpp +28 -8
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +58 -15
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +13 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +129 -14
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +13 -9
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +14 -4
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +13 -8
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/suffix.hpp +159 -85
- data/src/cxx_supportlib/vendor-modified/boost/config/user.hpp +15 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +351 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +371 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +283 -213
- data/src/cxx_supportlib/vendor-modified/boost/container/container_fwd.hpp +195 -51
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +840 -625
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +24 -13
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/addressof.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +289 -181
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithm.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_helpers.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/alloc_lib.h +314 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocation_type.hpp +11 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocator_version_traits.hpp +24 -25
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/auto_link.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_list.hpp +139 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/block_slist.hpp +157 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +74 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +16 -14
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_end.hpp +1 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +1142 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/destroyers.hpp +61 -48
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +293 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dlmalloc.hpp +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +335 -408
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/function_detector.hpp +9 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +383 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator_to_raw_pointer.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +300 -83
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +13 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/min_max.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/minimal_char_traits_header.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +45 -118
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/multiallocation_chain.hpp +22 -10
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +288 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/next_capacity.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +115 -109
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool.hpp +157 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_pool_impl.hpp +33 -23
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +62 -89
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/placement_new.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common.hpp +11 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_common_alloc.hpp +102 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pool_resource.hpp +191 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/singleton.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/to_raw_pointer.hpp +33 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/transform_iterator.hpp +17 -13
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +646 -595
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/type_traits.hpp +44 -184
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +7 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +9 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/version_type.hpp +23 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +50 -15
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +627 -287
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +608 -657
- data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +395 -376
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +616 -625
- data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +179 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +344 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/options.hpp +80 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/deque.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_map.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/global_resource.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/list.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/map.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/memory_resource.hpp +101 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +180 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/polymorphic_allocator.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/pool_options.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +193 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/set.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/slist.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/small_vector.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/stable_vector.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/string.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/synchronized_pool_resource.hpp +138 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/unsynchronized_pool_resource.hpp +194 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/vector.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator.hpp +423 -1019
- data/src/cxx_supportlib/vendor-modified/boost/container/scoped_allocator_fwd.hpp +23 -35
- data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +520 -626
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +416 -407
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +574 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +711 -470
- data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +314 -145
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +477 -282
- data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +63 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator.hpp +169 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +1660 -945
- data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +162 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/checked_delete.hpp +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/enable_if.hpp +128 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/explicit_operator_bool.hpp +154 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/ignore_unused.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/is_same.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test_trait.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/no_exceptions_support.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/noncopyable.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/null_deleter.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +301 -0
- data/src/cxx_supportlib/vendor-modified/boost/{detail/scoped_enum_emulation.hpp → core/scoped_enum.hpp} +19 -164
- data/src/cxx_supportlib/vendor-modified/boost/core/swap.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/typeinfo.hpp +151 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/underlying_type.hpp +79 -0
- data/src/cxx_supportlib/vendor-modified/boost/cstdint.hpp +132 -95
- data/src/cxx_supportlib/vendor-modified/boost/current_function.hpp +8 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/adjust_functors.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/c_local_time_adjustor.hpp +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/c_time.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/compiler_config.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/constrained_value.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_clock_device.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_defs.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration_types.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_facet.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_format_simple.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting_limited.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_formatting_locales.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_generator_formatter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_generator_parser.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_generators.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_names_put.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_parsing.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/dst_rules.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/dst_transition_generators.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/filetime_functions.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/format_date_parser.hpp +11 -7
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/conversion.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/formatters_limited.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_calendar.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day_of_year.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration_types.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_facet.hpp +352 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_serialize.hpp +517 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_ymd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/gregorian.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/gregorian_io.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/gregorian_types.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/parsers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.ipp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/date_time/int_adapter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/iso_format.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/conversion.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/custom_time_zone.hpp +169 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/date_duration_operators.hpp +115 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/dst_transition_day_rules.hpp +77 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +528 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_time.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_time_io.hpp +184 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_time_types.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/posix_time_zone.hpp +474 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/tz_database.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time_adjustor.hpp +218 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_timezone_defs.hpp +193 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/locale_config.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/microsec_time_clock.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/parse_format_base.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/period_formatter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/period_parser.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/conversion.hpp +9 -1
- 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.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_config.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_io.hpp +1 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_legacy_io.hpp +153 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_system.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/ptime.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_formatters_limited.hpp +212 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_parsers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_period.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_serialize.hpp +201 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/special_defs.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/special_values_formatter.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/string_convert.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/string_parse_tree.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/strings_from_facet.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_clock.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_defs.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_formatting_streams.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_parsing.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_resolution_traits.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_system_counted.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_system_split.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_base.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_names.hpp +98 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/tz_db_base.hpp +396 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/wrapping_int.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/year_month_day.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/detail/basic_pointerbuf.hpp +139 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/container_fwd.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/detail/endian.hpp +3 -118
- data/src/cxx_supportlib/vendor-modified/boost/detail/fenv.hpp +30 -3
- data/src/cxx_supportlib/vendor-modified/boost/detail/indirect_traits.hpp +0 -283
- data/src/cxx_supportlib/vendor-modified/boost/detail/iterator.hpp +9 -477
- data/src/cxx_supportlib/vendor-modified/boost/detail/no_exceptions_support.hpp +12 -82
- data/src/cxx_supportlib/vendor-modified/boost/detail/reference_content.hpp +0 -21
- data/src/cxx_supportlib/vendor-modified/boost/detail/sp_typeinfo.hpp +8 -107
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/clone_current_exception.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/exception_ptr.hpp +8 -3
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/type_info.hpp +7 -9
- data/src/cxx_supportlib/vendor-modified/boost/exception/diagnostic_information.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/foreach.hpp +11 -12
- data/src/cxx_supportlib/vendor-modified/boost/function/detail/gen_maybe_include.pl +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function0.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function1.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function10.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function2.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function3.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function4.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function5.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function6.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function7.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function8.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function9.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +6 -24
- data/src/cxx_supportlib/vendor-modified/boost/function/function_fwd.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +35 -30
- data/src/cxx_supportlib/vendor-modified/boost/function/function_typeof.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/function/gen_function_N.pl +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/float_functions.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/hash_float.hpp +22 -28
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/limits.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/extensions.hpp +5 -66
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash.hpp +77 -48
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash_fwd.hpp +3 -7
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash_fwd.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/get_pointer.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer.hpp +25 -24
- data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_ct.hpp +102 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer_fwd.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/integer_traits.hpp +1 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/any_hook.hpp +47 -55
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +655 -2197
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set_hook.hpp +16 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +376 -1605
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +329 -601
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +982 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set_hook.hpp +17 -27
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +2101 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/{detail/tree_algorithms.hpp → bstree_algorithms.hpp} +973 -684
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +121 -66
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +30 -28
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/derivation_value_traits.hpp +22 -15
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algo_type.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algorithm.hpp +90 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +48 -61
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/array_initializer.hpp +95 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/assert.hpp +6 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/avltree_node.hpp +19 -24
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +184 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +104 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_begin.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_end.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +235 -39
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/empty_node_checker.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/equal_to_value.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/exception_disposer.hpp +88 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/function_detector.hpp +8 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +107 -95
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/get_value_traits.hpp +222 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/has_member_function_callable_with.hpp +279 -296
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +122 -85
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +186 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iiterator.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/is_stateful_value_traits.hpp +9 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +155 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +99 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +133 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_node.hpp +14 -139
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/math.hpp +295 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/minimal_less_equal_header.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/minimal_pair_header.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/mpl.hpp +160 -337
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_cloner_disposer.hpp +105 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_holder.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_to_value.hpp +130 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +34 -11
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/pointer_element.hpp +168 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/rbtree_node.hpp +22 -19
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/reverse_iterator.hpp +144 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/simple_disposers.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +124 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_node.hpp +14 -117
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/std_fwd.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/to_raw_pointer.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/transform_iterator.hpp +18 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_node.hpp +13 -133
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +89 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/uncast.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +22 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +2006 -1615
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/intrusive_fwd.hpp +450 -229
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +17 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/link_mode.hpp +21 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +253 -282
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list_hook.hpp +17 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/member_value_traits.hpp +21 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/options.hpp +94 -648
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pack_options.hpp +374 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/parent_from_member.hpp +10 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +16 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_rebind.hpp +188 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +97 -44
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +29 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +366 -1592
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +297 -639
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +619 -2187
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/set_hook.hpp +16 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +661 -2252
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +468 -1493
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +163 -594
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +326 -307
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist_hook.hpp +16 -21
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +686 -2238
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +425 -1575
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +422 -703
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +440 -1122
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +158 -406
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +558 -2257
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/trivial_value_traits.hpp +14 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +476 -1611
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +36 -27
- data/src/cxx_supportlib/vendor-modified/boost/iterator.hpp +3 -42
- data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_def.hpp +4 -13
- data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/config_undef.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/enable_if.hpp +2 -5
- data/src/cxx_supportlib/vendor-modified/boost/iterator/detail/facade_iterator_category.hpp +15 -22
- data/src/cxx_supportlib/vendor-modified/boost/iterator/interoperable.hpp +8 -4
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_adaptor.hpp +59 -64
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_categories.hpp +77 -50
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_concepts.hpp +13 -22
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_facade.hpp +318 -212
- data/src/cxx_supportlib/vendor-modified/boost/iterator/iterator_traits.hpp +17 -49
- data/src/cxx_supportlib/vendor-modified/boost/iterator/{detail/minimum_category.hpp → minimum_category.hpp} +24 -45
- data/src/cxx_supportlib/vendor-modified/boost/iterator/reverse_iterator.hpp +10 -5
- data/src/cxx_supportlib/vendor-modified/boost/iterator/transform_iterator.hpp +17 -18
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +29 -2649
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +101 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +498 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +787 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +194 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +197 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +294 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +212 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/c_regex_traits.cpp +24 -11
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cpp_regex_traits.cpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cregex.cpp +40 -40
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +14 -17
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_raw_buffer.cpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex_traits_defaults.cpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/static_mutex.cpp +8 -4
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wc_regex_traits.cpp +24 -11
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/wide_posix_api.cpp +11 -14
- data/src/cxx_supportlib/vendor-modified/boost/libs/system/src/error_code.cpp +3 -420
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once.cpp +3 -5
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once_atomic.cpp +0 -6
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +173 -77
- data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +83 -33
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/detail/fp_traits.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp +42 -12
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +196 -18
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/sign.hpp +52 -8
- data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +111 -13
- data/src/cxx_supportlib/vendor-modified/boost/math/tools/promotion.hpp +40 -8
- data/src/cxx_supportlib/vendor-modified/boost/math/tools/real_cast.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/math/tools/user.hpp +8 -0
- data/src/cxx_supportlib/vendor-modified/boost/memory_order.hpp +9 -5
- data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +233 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +10 -3
- data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +223 -54
- data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +201 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +6 -10
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_end.hpp +2 -10
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +661 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_traits.hpp +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +468 -62
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +120 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +206 -129
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_begin.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/std_ns_end.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +1078 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +591 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +33 -19
- data/src/cxx_supportlib/vendor-modified/boost/move/make_unique.hpp +237 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/move.hpp +9 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/traits.hpp +30 -95
- data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +871 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +53 -98
- data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +317 -0
- data/src/cxx_supportlib/vendor-modified/boost/mpl/O1_size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/O1_size_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/accumulate.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/advance.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/advance_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/alias.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/always.hpp +6 -7
- data/src/cxx_supportlib/vendor-modified/boost/mpl/and.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/mpl/apply.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/apply_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/apply_wrap.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/arg.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/arg_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/arithmetic.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/as_sequence.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/mpl/at.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/at_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/O1_size_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/adl_barrier.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/advance_backward.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/advance_forward.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/apply_1st.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arg_typedef.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arithmetic_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arity.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/arity_spec.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/at_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/back_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/basic_bind.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/begin_end_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/clear_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/common_name_wknd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/comparison_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/adl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/arrays.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/bcc.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/bind.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/compiler.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/ctps.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/dependent_nttp.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/dtp.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/eti.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/forwarding.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/gcc.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/gpu.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/has_apply.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/has_xxx.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/integral.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/intel.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/lambda.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/msvc.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/msvc_typename.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/nttp.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/operators.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/overload_resolution.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/pp_counter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/preprocessor.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/static_constant.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/ttp.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/typeof.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/use_preprocessed.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/config/workaround.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/contains_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/count_args.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/count_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/empty_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/erase_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/erase_key_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/filter_iter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_impl_body.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/fold_pred.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/front_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/full_lambda.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_apply.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_begin.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_key_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_rebind.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/has_type.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/include_preprocessed.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/insert_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/insert_range_impl.hpp +22 -19
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/inserter_algorithm.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/integral_wrapper.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/is_msvc_eti_arg.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_apply.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_fold_if_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_fold_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/iter_push_front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/joint_iter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_arity_param.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_no_ctps.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_spec.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/lambda_support.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/largest_int.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/logical_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_dtw.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_eti_base.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_is_class.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_never_true.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/msvc_type.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_assert.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/na_spec.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/nested_type_wknd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/nttp_decl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/numeric_cast_utils.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/numeric_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/order_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/overload_names.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/partition_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/pop_back_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/pop_front_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/add.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/def_params_tail.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/default_params.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/enum.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/ext_params.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/filter_params.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/is_seq.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/params.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/partial_spec_params.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/range.hpp +11 -4
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/repeat.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/sub.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/token_equal.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/preprocessor/tuple.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/ptr_to_ref.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/push_back_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/push_front_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/O1_size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/empty.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/iterator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/range_c/tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/reverse_fold_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/reverse_fold_impl_body.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/reverse_iter_fold_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/sequence_wrapper.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/shift_op.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/single_element_iter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/size_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/sort_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/static_cast.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/template_arity.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/template_arity_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test/assert.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test/data.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/test/test_case.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/traits_lambda_spec.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/transform_iter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/type_wrapper.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/unwrap.hpp +7 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/value_wknd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/aux_/yes_no.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/back_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/back_inserter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/base.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/begin.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/begin_end.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/begin_end_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bind.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bind_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bitand.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bitor.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bitwise.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bitxor.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bool.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/mpl/bool_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/clear.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/clear_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/comparison.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/contains.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/contains_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/copy.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/copy_if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/count.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/count_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/count_if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/deque.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/deref.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/distance.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/distance_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/divides.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/empty.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/empty_base.hpp +13 -9
- data/src/cxx_supportlib/vendor-modified/boost/mpl/empty_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/empty_sequence.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/mpl/end.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/equal.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/equal_to.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/erase.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/erase_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/erase_key.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/erase_key_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/eval_if.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/mpl/filter_view.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/find.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/find_if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/fold.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/for_each.hpp +11 -4
- data/src/cxx_supportlib/vendor-modified/boost/mpl/front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/front_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/front_inserter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/greater.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/greater_equal.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/has_key.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/has_key_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/has_xxx.hpp +12 -5
- data/src/cxx_supportlib/vendor-modified/boost/mpl/identity.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/index_if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/index_of.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/inherit.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/inherit_linearly.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/insert.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/insert_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/insert_range.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/insert_range_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/inserter.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/int.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/int_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/integral_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/integral_c_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/integral_c_tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/is_placeholder.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/is_sequence.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/iter_fold.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/iter_fold_if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/iterator_category.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/iterator_range.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/iterator_tags.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/joint_view.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/key_type.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/key_type_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/lambda.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/lambda_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/less.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/less_equal.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/arity.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/list.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/map.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/set.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/unrolling.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/limits/vector.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/O1_size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/begin_end.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/clear.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/empty.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/include_preprocessed.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/item.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/iterator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/numbered.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/numbered_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/pop_front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/push_back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/push_front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/aux_/tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list0.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list0_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list10.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list10_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list20.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list20_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list30.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list30_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list40.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list40_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list50.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list/list50_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/list_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/logical.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/long.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/long_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/lower_bound.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/at_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/begin_end_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/clear_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/contains_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/empty_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/erase_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/erase_key_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/has_key_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/include_preprocessed.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/insert_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/insert_range_impl.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/item.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/iterator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/key_type_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/map0.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/numbered.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/size_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/aux_/value_type_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map0.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map10.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map20.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map30.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map40.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/map/map50.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/math/fixed_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/math/is_even.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/math/rational_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/max.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/max_element.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/min.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/min_element.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/min_max.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/minus.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/modulus.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/multiplies.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/count_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/insert_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/item.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/multiset0.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/aux_/tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/multiset/multiset0.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/negate.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/next.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/next_prior.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/not.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/not_equal_to.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/numeric_cast.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/or.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/mpl/order.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/order_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/pair.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/pair_view.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/partition.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/placeholders.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/plus.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_back_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/pop_front_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/print.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/mpl/prior.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/protect.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/push_back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/push_back_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/push_front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/push_front_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/quote.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/range_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/remove.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/remove_if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/replace.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/replace_if.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/reverse.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/reverse_fold.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/reverse_iter_fold.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/same_as.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/sequence_tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/sequence_tag_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/at_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/begin_end_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/clear_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/empty_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/erase_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/erase_key_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/has_key_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/include_preprocessed.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/insert_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/insert_range_impl.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/item.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/iterator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/key_type_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/numbered.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/numbered_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/set0.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/size_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/aux_/value_type_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set0.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set0_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set10.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set10_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set20.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set20_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set30.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set30_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set40.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set40_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set50.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set/set50_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/set_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/shift_left.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/shift_right.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/single_view.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/size_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/size_t.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/size_t_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/sizeof.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/sort.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/stable_partition.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/string.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/mpl/switch.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/times.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/transform.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/transform_view.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/unique.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/unpack_args.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/upper_bound.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/value_type.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/value_type_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/O1_size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/at.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/begin_end.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/clear.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/empty.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/include_preprocessed.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/item.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/iterator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/numbered.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/numbered_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/pop_back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/pop_front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/push_back.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/push_front.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/size.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/tag.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/aux_/vector0.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector0.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector0_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector10.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector10_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector20.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector20_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector30.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector30_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector40.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector40_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector50.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector/vector50_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/vector_c.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/void.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/void_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/zip_view.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/next_prior.hpp +118 -4
- data/src/cxx_supportlib/vendor-modified/boost/noncopyable.hpp +12 -43
- data/src/cxx_supportlib/vendor-modified/boost/none.hpp +32 -1
- data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +18 -2
- data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +9 -37
- data/src/cxx_supportlib/vendor-modified/boost/optional/bad_optional_access.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +660 -84
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional_io.hpp +94 -0
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/arg_list.hpp +4 -27
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/cast.hpp +2 -4
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/parenthesized_type.hpp +0 -84
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/set.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/tagged_argument.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/parameter/aux_/unwrap_cv_reference.hpp +0 -6
- data/src/cxx_supportlib/vendor-modified/boost/parameter/binding.hpp +2 -28
- data/src/cxx_supportlib/vendor-modified/boost/parameter/keyword.hpp +0 -30
- data/src/cxx_supportlib/vendor-modified/boost/parameter/name.hpp +5 -15
- data/src/cxx_supportlib/vendor-modified/boost/parameter/preprocessor.hpp +6 -107
- data/src/cxx_supportlib/vendor-modified/boost/parameter/value_type.hpp +2 -28
- data/src/cxx_supportlib/vendor-modified/boost/pool/detail/mutex.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/pool/pool.hpp +12 -12
- data/src/cxx_supportlib/vendor-modified/boost/predef.h +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture.h +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/alpha.h +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/arm.h +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/blackfin.h +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/convex.h +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ia64.h +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/m68k.h +82 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/mips.h +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/parisc.h +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ppc.h +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/pyramid.h +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/rs6k.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sparc.h +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/superh.h +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys370.h +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/sys390.h +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86.h +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/32.h +87 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/x86/64.h +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/z.h +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler.h +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/borland.h +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/clang.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/comeau.h +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/compaq.h +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/diab.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/digitalmars.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/dignus.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/edg.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/ekopath.h +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/gcc.h +68 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/gcc_xml.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/greenhills.h +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/hp_acc.h +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/iar.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/ibm.h +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/kai.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/llvm.h +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/metaware.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/metrowerks.h +77 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/microtec.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/mpw.h +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/palm.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/pgi.h +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/sgi_mipspro.h +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/sunpro.h +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/tendra.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/visualc.h +91 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/watcom.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/_cassert.h +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/_exception.h +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/comp_detected.h +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/endian_compat.h +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/os_detected.h +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/platform_detected.h +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/test.h +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/test_def.h +71 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware.h +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd.h +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/arm.h +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/arm/versions.h +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/ppc.h +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/ppc/versions.h +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86.h +123 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86/versions.h +129 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd.h +87 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd/versions.h +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/language.h +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/language/objc.h +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/language/stdc.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/language/stdcpp.h +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library.h +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/c.h +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/_prefix.h +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/gnu.h +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/uc.h +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/vms.h +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/c/zos.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std.h +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/_prefix.h +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/cxx.h +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/dinkumware.h +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/libcomo.h +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/modena.h +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/msl.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/roguewave.h +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/sgi.h +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/stdcpp3.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/stlport.h +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/library/std/vacpp.h +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/make.h +89 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os.h +33 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/aix.h +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/amigaos.h +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/android.h +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/beos.h +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd.h +103 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/bsdi.h +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/dragonfly.h +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/free.h +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/net.h +84 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/bsd/open.h +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/haiku.h +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/hpux.h +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/ios.h +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/irix.h +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/linux.h +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/macos.h +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/os400.h +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/qnxnto.h +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/solaris.h +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/unix.h +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/vms.h +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/windows.h +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/other.h +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/other/endian.h +204 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/platform.h +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/platform/mingw.h +69 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_desktop.h +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_phone.h +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_runtime.h +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/platform/windows_store.h +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/version_number.h +53 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/arithmetic/dec.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/detail/get_data.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/push_back.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/push_front.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_list.hpp +17 -3
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_seq.hpp +16 -3
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/array/to_tuple.hpp +12 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +11 -12
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/detail/is_empty.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/empty.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/identity.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty.hpp +17 -4
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty_or_1.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/facilities/is_empty_variadic.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/library.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/to_array.hpp +33 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/list/to_tuple.hpp +27 -4
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/detail/is_begin_parens.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/is_begin_parens.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/punctuation/remove_parens.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/repetition/for.hpp +19 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/is_empty.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/for_each.hpp +57 -10
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/for_each_i.hpp +58 -10
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/replace.hpp +18 -2
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/rest_n.hpp +19 -3
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/size.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/variadic_seq_to_seq.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple.hpp +8 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/detail/is_single_return.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/eat.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/elem.hpp +12 -2
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/insert.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_back.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/pop_front.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_back.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/push_front.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/rem.hpp +18 -3
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/remove.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/replace.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/reverse.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_array.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_list.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/tuple/to_seq.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/variadic/detail/is_single_return.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/algorithm/equal.hpp +5 -3
- data/src/cxx_supportlib/vendor-modified/boost/range/as_literal.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/range/begin.hpp +5 -13
- data/src/cxx_supportlib/vendor-modified/boost/range/concepts.hpp +35 -15
- data/src/cxx_supportlib/vendor-modified/boost/range/config.hpp +9 -7
- data/src/cxx_supportlib/vendor-modified/boost/range/const_iterator.hpp +39 -30
- data/src/cxx_supportlib/vendor-modified/boost/range/detail/common.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/range/detail/extract_optional_type.hpp +21 -25
- data/src/cxx_supportlib/vendor-modified/boost/range/detail/has_member_size.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/detail/implementation_help.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/detail/msvc_has_iterator_workaround.hpp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/difference_type.hpp +20 -2
- data/src/cxx_supportlib/vendor-modified/boost/range/distance.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/range/empty.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/range/end.hpp +5 -13
- data/src/cxx_supportlib/vendor-modified/boost/range/functions.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/range/has_range_iterator.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/iterator.hpp +36 -34
- data/src/cxx_supportlib/vendor-modified/boost/range/iterator_range_core.hpp +481 -251
- data/src/cxx_supportlib/vendor-modified/boost/range/mutable_iterator.hpp +41 -29
- data/src/cxx_supportlib/vendor-modified/boost/range/range_fwd.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/rbegin.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/range/rend.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/range/reverse_iterator.hpp +5 -3
- data/src/cxx_supportlib/vendor-modified/boost/range/size.hpp +30 -6
- data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +18 -12
- data/src/cxx_supportlib/vendor-modified/boost/range/value_type.hpp +1 -5
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/abs.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/gcd.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/lcm.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/mpl/sign.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/ratio/detail/overflow_helpers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio.hpp +63 -3
- data/src/cxx_supportlib/vendor-modified/boost/ratio/ratio_fwd.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/ref.hpp +12 -184
- data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +51 -9
- data/src/cxx_supportlib/vendor-modified/boost/regex/mfc.hpp +30 -34
- data/src/cxx_supportlib/vendor-modified/boost/regex/pattern_except.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/pending/static_mutex.hpp +10 -7
- data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +11 -5
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex.hpp +18 -19
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +25 -38
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +211 -14
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +161 -106
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cregex.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +24 -21
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/iterator_traits.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_results.hpp +24 -19
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +46 -20
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +38 -14
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +206 -31
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +122 -16
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/primary_transform.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/protected_call.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +15 -15
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_grep.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_iterator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_match.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_raw_buffer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_replace.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_search.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_split.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_token_iterator.hpp +6 -15
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +10 -10
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +10 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/states.hpp +23 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/sub_match.hpp +75 -71
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_iterator.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_token_iterator.hpp +6 -15
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +43 -41
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +103 -172
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_allocator.hpp +318 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_count_impl.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_traits.hpp +16 -9
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_utility.hpp +106 -70
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +36 -59
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_nt.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/{atomic_count_pthreads.hpp → atomic_count_pt.hpp} +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_spin.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count_std_atomic.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/operator_bool.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +116 -10
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_convertible.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +15 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +140 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_pt.hpp +16 -15
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +137 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +21 -4
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_disable_deprecated.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_forward.hpp +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_if_array.hpp +8 -5
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_nullptr_t.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_gcc_arm.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_pool.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock_std_atomic.hpp +83 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +30 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +80 -169
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +121 -118
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +54 -12
- data/src/cxx_supportlib/vendor-modified/boost/static_assert.hpp +4 -19
- data/src/cxx_supportlib/vendor-modified/boost/swap.hpp +11 -6
- data/src/cxx_supportlib/vendor-modified/boost/system/config.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.ipp +467 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/barrier.hpp +222 -36
- data/src/cxx_supportlib/vendor-modified/boost/thread/caller_context.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/completion_latch.hpp +4 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_adaptor.hpp +209 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_base.hpp +202 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/deque_views.hpp +165 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_deque_base.hpp +223 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/detail/sync_queue_base.hpp +223 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_adaptor.hpp +209 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_base.hpp +202 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_op_status.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_views.hpp +155 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_bounded_queue.hpp +725 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_deque.hpp +327 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_priority_queue.hpp +369 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_queue.hpp +335 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +466 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/deque.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/devector.hpp +102 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/functional.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/list.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/allocator_arg.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/allocator_traits.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/config.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/default_delete.hpp +41 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/pointer_traits.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/scoped_allocator.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/shared_ptr.hpp +42 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/memory/unique_ptr.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/queue.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/tuple.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/csbl/vector.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/cv_status.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +32 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/counter.hpp +17 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/delete.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/function_wrapper.hpp +93 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/invoke.hpp +373 -120
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/invoker.hpp +762 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/is_convertible.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/memory.hpp +11 -119
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/move.hpp +116 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/nullary_function.hpp +234 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +41 -16
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread_group.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/variadic_footer.hpp +10 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/variadic_header.hpp +19 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/exceptional_ptr.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/executor.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/basic_thread_pool.hpp +318 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/detail/priority_executor_base.hpp +77 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/detail/scheduled_executor_base.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor.hpp +148 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor_adaptor.hpp +136 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/generic_executor_ref.hpp +213 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/inline_executor.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/loop_executor.hpp +205 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduled_thread_pool.hpp +48 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduler.hpp +271 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/scheduling_adaptor.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/serial_executor.hpp +216 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/serial_executor_cont.hpp +170 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/thread_executor.hpp +157 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/work.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/config/inline_namespace.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/exception_list.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v1/exception_list.hpp +70 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v1/inline_namespace.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/inline_namespace.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/parallel/v2/task_region.hpp +316 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/experimental/task_region.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/externally_locked.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +3327 -1705
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/future_error.hpp +98 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/{future_error_code.hpp → futures/future_error_code.hpp} +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/future_status.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/is_future_type.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/launch.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_all.hpp +74 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_any.hpp +161 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/latch.hpp +43 -15
- data/src/cxx_supportlib/vendor-modified/boost/thread/lock_types.hpp +45 -41
- data/src/cxx_supportlib/vendor-modified/boost/thread/lockable_adapter.hpp +28 -28
- data/src/cxx_supportlib/vendor-modified/boost/thread/once.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/ostream_buffer.hpp +45 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/poly_lockable.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +101 -56
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +141 -47
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/mutex.hpp +20 -13
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/once_atomic.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/recursive_mutex.hpp +11 -8
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +39 -10
- data/src/cxx_supportlib/vendor-modified/boost/thread/scoped_thread.hpp +15 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/shared_mutex.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/sync_bounded_queue.hpp +2 -580
- data/src/cxx_supportlib/vendor-modified/boost/thread/sync_queue.hpp +2 -502
- data/src/cxx_supportlib/vendor-modified/boost/thread/synchronized_value.hpp +78 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/testable_mutex.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/thread_pool.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/tss.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/thread/user_scheduler.hpp +202 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/v2/shared_mutex.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/thread/v2/thread.hpp +73 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/with_lock_guard.hpp +234 -0
- data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +7 -5
- data/src/cxx_supportlib/vendor-modified/boost/token_functions.hpp +3 -17
- data/src/cxx_supportlib/vendor-modified/boost/token_iterator.hpp +14 -14
- data/src/cxx_supportlib/vendor-modified/boost/tuple/detail/tuple_basic.hpp +14 -5
- data/src/cxx_supportlib/vendor-modified/boost/tuple/tuple.hpp +1 -24
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_const.hpp +9 -10
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_cv.hpp +2 -9
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_lvalue_reference.hpp +8 -7
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_pointer.hpp +6 -17
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_reference.hpp +14 -62
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_rvalue_reference.hpp +5 -7
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_volatile.hpp +2 -9
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/aligned_storage.hpp +134 -9
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/alignment_of.hpp +9 -18
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/{detail/wrap.hpp → alignment_traits.hpp} +7 -10
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/arithmetic_traits.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/array_traits.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/broken_compiler_spec.hpp +9 -105
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/common_type.hpp +118 -131
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/conditional.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/config.hpp +5 -60
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/copy_cv.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/decay.hpp +12 -13
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/declval.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/bool_trait_def.hpp +9 -26
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/bool_trait_undef.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_arithmetic_type.hpp +212 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_type_impl.hpp +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/composite_member_pointer_type.hpp +113 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/composite_pointer_type.hpp +153 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/config.hpp +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_binary_operator.hpp +12 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_postfix_operator.hpp +12 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_prefix_operator.hpp +14 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_and.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_eq.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_not.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/ice_or.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_helper.hpp +13 -57
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_ptr_tester.hpp +13 -218
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp +13 -107
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp +15 -974
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/mp_defer.hpp +56 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/template_arity_spec.hpp +6 -21
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/extent.hpp +138 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/floating_point_promotion.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/function_traits.hpp +0 -62
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_and.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_and_assign.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_or.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_or_assign.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_xor.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_bit_xor_assign.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_complement.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_dereference.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_divides.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_divides_assign.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_equal_to.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_greater.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_greater_equal.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_left_shift.hpp +19 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_left_shift_assign.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_less.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_less_equal.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_logical_and.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_logical_not.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_logical_or.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus_assign.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_modulus.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_modulus_assign.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_multiplies.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_multiplies_assign.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_negate.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_new_operator.hpp +147 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_not_equal_to.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_assign.hpp +57 -18
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_constructor.hpp +43 -24
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_copy.hpp +52 -23
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_destructor.hpp +47 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_operator.hpp +51 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_plus.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_plus_assign.hpp +66 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_post_decrement.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_post_increment.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_pre_decrement.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_pre_increment.hpp +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_right_shift.hpp +19 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_right_shift_assign.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_assign.hpp +23 -29
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_constructor.hpp +31 -25
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_copy.hpp +34 -36
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_destructor.hpp +21 -22
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_assign.hpp +40 -25
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_constructor.hpp +45 -25
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_unary_minus.hpp +25 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_unary_plus.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_virtual_destructor.hpp +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_constant.hpp +86 -33
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_promotion.hpp +181 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +116 -41
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_abstract.hpp +6 -10
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_arithmetic.hpp +3 -32
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_array.hpp +12 -60
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_assignable.hpp +76 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_base_and_derived.hpp +9 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_base_of.hpp +8 -20
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_base_of_tr1.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_class.hpp +17 -43
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complex.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_compound.hpp +2 -24
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_const.hpp +8 -127
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_constructible.hpp +80 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_convertible.hpp +94 -98
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_copy_assignable.hpp +141 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_copy_constructible.hpp +187 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +64 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +60 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_empty.hpp +8 -117
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_enum.hpp +19 -42
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_final.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_float.hpp +2 -9
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_floating_point.hpp +12 -9
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_function.hpp +9 -18
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_fundamental.hpp +2 -21
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_integral.hpp +43 -37
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_lvalue_reference.hpp +8 -76
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_function_pointer.hpp +18 -34
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_object_pointer.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_pointer.hpp +8 -79
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +32 -35
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +43 -41
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_object.hpp +7 -32
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pod.hpp +14 -101
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pointer.hpp +12 -127
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_polymorphic.hpp +122 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_reference.hpp +6 -21
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_rvalue_reference.hpp +4 -8
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_same.hpp +4 -66
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_scalar.hpp +3 -31
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_signed.hpp +83 -60
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_stateless.hpp +8 -23
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_union.hpp +6 -32
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_unsigned.hpp +85 -57
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +105 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_void.hpp +7 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_volatile.hpp +8 -115
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_signed.hpp +35 -57
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_unsigned.hpp +34 -57
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/promote.hpp +20 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/rank.hpp +86 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/reference_traits.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_bounds.hpp +4 -31
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +8 -65
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +13 -57
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +35 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_pointer.hpp +8 -23
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_reference.hpp +5 -21
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +7 -61
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_identity.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +101 -239
- data/src/cxx_supportlib/vendor-modified/boost/typeof/dmc/typeof_impl.hpp +100 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode.hpp +61 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode_params.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/incr_registration_group.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/int_encoding.hpp +118 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/integral_template_param.hpp +80 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/modifiers.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/msvc/typeof_impl.hpp +283 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/pointers_data_members.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_functions.hpp +50 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_functions_iterate.hpp +135 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_fundamental.hpp +62 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_mem_functions.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/bitset.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/complex.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/deque.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/fstream.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/functional.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/iostream.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/istream.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/iterator.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/list.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/locale.hpp +40 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/map.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/memory.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/ostream.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/queue.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/set.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/sstream.hpp +32 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/stack.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/streambuf.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/string.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/utility.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/valarray.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/std/vector.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/template_encoding.hpp +160 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/template_template_param.hpp +149 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/type_encoding.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/type_template_param.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof_impl.hpp +186 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/unsupported.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector100.hpp +321 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector150.hpp +471 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector200.hpp +621 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector50.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/allocate.hpp +42 -34
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/buckets.hpp +108 -56
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/equivalent.hpp +30 -24
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/extract_key.hpp +21 -16
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/table.hpp +45 -33
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unique.hpp +21 -15
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/util.hpp +8 -2
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +11 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +11 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/unordered_map.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/unordered_set.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/utility.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/addressof.hpp +11 -96
- data/src/cxx_supportlib/vendor-modified/boost/utility/base_from_member.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/binary.hpp +708 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/declval.hpp +5 -41
- data/src/cxx_supportlib/vendor-modified/boost/utility/detail/result_of_iterate.hpp +18 -5
- data/src/cxx_supportlib/vendor-modified/boost/utility/empty_deleter.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/enable_if.hpp +10 -112
- data/src/cxx_supportlib/vendor-modified/boost/utility/explicit_operator_bool.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/identity_type.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/in_place_factory.hpp +2 -4
- data/src/cxx_supportlib/vendor-modified/boost/utility/result_of.hpp +25 -9
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +536 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref_fwd.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/swap.hpp +10 -48
- data/src/cxx_supportlib/vendor-modified/boost/utility/typed_in_place_factory.hpp +77 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/value_init.hpp +281 -0
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/visit_each.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/modp_b64.cpp +3 -1
- data/src/nginx_module/Configuration.c +157 -6
- data/src/nginx_module/Configuration.h +3 -1
- data/src/nginx_module/ContentHandler.c +2 -1
- data/src/nginx_module/ngx_http_passenger_module.c +27 -46
- data/src/nodejs_supportlib/phusion_passenger/log_express.js +1 -1
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +102 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +20 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/config_utils.rb +36 -3
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +3 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/LICENSE.md +1 -1
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core.rb +7 -0
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/api.rb +28 -0
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/request_reporter/misc.rb +4 -0
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/spec_helper.rb +18 -0
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/transaction.rb +1 -10
- data/src/ruby_supportlib/phusion_passenger/vendor/union_station_hooks_core/lib/union_station_hooks_core/version_data.rb +4 -4
- metadata +609 -62
- data/src/agent/UstRouter/DataStoreId.h +0 -184
- data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/output.0 +0 -15374
- data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/output.1 +0 -15374
- data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/output.2 +0 -15374
- data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/requests +0 -568
- data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/traces.0 +0 -3104
- data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/traces.1 +0 -3104
- data/src/cxx_supportlib/vendor-copy/libuv/autom4te.cache/traces.2 +0 -699
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/base.hpp +0 -585
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas32strong.hpp +0 -885
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas32weak.hpp +0 -947
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/cas64strong.hpp +0 -443
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-alpha.hpp +0 -368
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-armv6plus.hpp +0 -252
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-cas.hpp +0 -157
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-ppc.hpp +0 -2850
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-sparcv9.hpp +0 -1259
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/gcc-x86.hpp +0 -1766
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/generic-cas.hpp +0 -206
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/linux-arm.hpp +0 -189
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/type-classification.hpp +0 -45
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/algorithms.hpp +0 -84
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/memory_util.hpp +0 -83
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/preprocessor.hpp +0 -232
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/utilities.hpp +0 -1141
- data/src/cxx_supportlib/vendor-modified/boost/detail/is_incrementable.hpp +0 -134
- data/src/cxx_supportlib/vendor-modified/boost/detail/is_xxx.hpp +0 -61
- data/src/cxx_supportlib/vendor-modified/boost/detail/limits.hpp +0 -449
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/attribute_noreturn.hpp +0 -17
- data/src/cxx_supportlib/vendor-modified/boost/indirect_reference.hpp +0 -43
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/clear_on_destructor_base.hpp +0 -36
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/memory_util.hpp +0 -288
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/preprocessor.hpp +0 -52
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/utilities.hpp +0 -858
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set_hook.hpp +0 -292
- data/src/cxx_supportlib/vendor-modified/boost/libs/atomic/lockpool.cpp +0 -24
- data/src/cxx_supportlib/vendor-modified/boost/libs/system/src/local_free_on_destruction.hpp +0 -40
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/timeconv.inl +0 -151
- data/src/cxx_supportlib/vendor-modified/boost/math/common_factor_ct.hpp +0 -180
- data/src/cxx_supportlib/vendor-modified/boost/math_fwd.hpp +0 -108
- data/src/cxx_supportlib/vendor-modified/boost/parameter.hpp +0 -21
- data/src/cxx_supportlib/vendor-modified/boost/pointee.hpp +0 -74
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/allocate_array_helper.hpp +0 -169
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_deleter.hpp +0 -124
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/make_array_helper.hpp +0 -157
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/async_func.hpp +0 -571
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_type_imp.hpp +0 -333
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/cv_traits_impl.hpp +0 -97
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/false_result.hpp +0 -28
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/size_t_trait_def.hpp +0 -60
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/size_t_trait_undef.hpp +0 -16
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/type_trait_def.hpp +0 -67
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/type_trait_undef.hpp +0 -19
- data/src/cxx_supportlib/vendor-modified/boost/units/detail/utility.hpp +0 -104
@@ -11,13 +11,17 @@
|
|
11
11
|
#ifndef BOOST_CONTAINER_THROW_EXCEPTION_HPP
|
12
12
|
#define BOOST_CONTAINER_THROW_EXCEPTION_HPP
|
13
13
|
|
14
|
-
#
|
15
|
-
#include <boost/
|
14
|
+
#ifndef BOOST_CONFIG_HPP
|
15
|
+
# include <boost/config.hpp>
|
16
|
+
#endif
|
16
17
|
|
17
|
-
#if
|
18
|
+
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
18
19
|
# pragma once
|
19
20
|
#endif
|
20
21
|
|
22
|
+
#include <boost/container/detail/config_begin.hpp>
|
23
|
+
#include <boost/container/detail/workaround.hpp>
|
24
|
+
|
21
25
|
#ifndef BOOST_NO_EXCEPTIONS
|
22
26
|
#include <stdexcept> //for std exception types
|
23
27
|
#include <new> //for std::bad_alloc
|
@@ -76,26 +80,82 @@ namespace container {
|
|
76
80
|
|
77
81
|
#else //defined(BOOST_NO_EXCEPTIONS)
|
78
82
|
|
83
|
+
//! Exception callback called by Boost.Container when fails to allocate the requested storage space.
|
84
|
+
//! <ul>
|
85
|
+
//! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::bad_alloc()</code> is thrown.</li>
|
86
|
+
//!
|
87
|
+
//! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
|
88
|
+
//! is NOT defined <code>BOOST_ASSERT(!"boost::container bad_alloc thrown")</code> is called
|
89
|
+
//! and <code>std::abort()</code> if the former returns.</li>
|
90
|
+
//!
|
91
|
+
//! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
|
92
|
+
//! the user must provide an implementation and the function should not return.</li>
|
93
|
+
//! </ul>
|
79
94
|
inline void throw_bad_alloc()
|
80
95
|
{
|
81
96
|
throw std::bad_alloc();
|
82
97
|
}
|
83
98
|
|
99
|
+
//! Exception callback called by Boost.Container to signal arguments out of range.
|
100
|
+
//! <ul>
|
101
|
+
//! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::out_of_range(str)</code> is thrown.</li>
|
102
|
+
//!
|
103
|
+
//! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
|
104
|
+
//! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container out_of_range thrown", str)</code> is called
|
105
|
+
//! and <code>std::abort()</code> if the former returns.</li>
|
106
|
+
//!
|
107
|
+
//! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
|
108
|
+
//! the user must provide an implementation and the function should not return.</li>
|
109
|
+
//! </ul>
|
84
110
|
inline void throw_out_of_range(const char* str)
|
85
111
|
{
|
86
112
|
throw std::out_of_range(str);
|
87
113
|
}
|
88
114
|
|
115
|
+
//! Exception callback called by Boost.Container to signal errors resizing.
|
116
|
+
//! <ul>
|
117
|
+
//! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::length_error(str)</code> is thrown.</li>
|
118
|
+
//!
|
119
|
+
//! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
|
120
|
+
//! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container length_error thrown", str)</code> is called
|
121
|
+
//! and <code>std::abort()</code> if the former returns.</li>
|
122
|
+
//!
|
123
|
+
//! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
|
124
|
+
//! the user must provide an implementation and the function should not return.</li>
|
125
|
+
//! </ul>
|
89
126
|
inline void throw_length_error(const char* str)
|
90
127
|
{
|
91
128
|
throw std::length_error(str);
|
92
129
|
}
|
93
130
|
|
131
|
+
//! Exception callback called by Boost.Container to report errors in the internal logical
|
132
|
+
//! of the program, such as violation of logical preconditions or class invariants.
|
133
|
+
//! <ul>
|
134
|
+
//! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::logic_error(str)</code> is thrown.</li>
|
135
|
+
//!
|
136
|
+
//! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
|
137
|
+
//! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container logic_error thrown", str)</code> is called
|
138
|
+
//! and <code>std::abort()</code> if the former returns.</li>
|
139
|
+
//!
|
140
|
+
//! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
|
141
|
+
//! the user must provide an implementation and the function should not return.</li>
|
142
|
+
//! </ul>
|
94
143
|
inline void throw_logic_error(const char* str)
|
95
144
|
{
|
96
145
|
throw std::logic_error(str);
|
97
146
|
}
|
98
147
|
|
148
|
+
//! Exception callback called by Boost.Container to report errors that can only be detected during runtime.
|
149
|
+
//! <ul>
|
150
|
+
//! <li>If BOOST_NO_EXCEPTIONS is NOT defined <code>std::runtime_error(str)</code> is thrown.</li>
|
151
|
+
//!
|
152
|
+
//! <li>If BOOST_NO_EXCEPTIONS is defined and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS
|
153
|
+
//! is NOT defined <code>BOOST_ASSERT_MSG(!"boost::container runtime_error thrown", str)</code> is called
|
154
|
+
//! and <code>std::abort()</code> if the former returns.</li>
|
155
|
+
//!
|
156
|
+
//! <li>If BOOST_NO_EXCEPTIONS and BOOST_CONTAINER_USER_DEFINED_THROW_CALLBACKS are defined
|
157
|
+
//! the user must provide an implementation and the function should not return.</li>
|
158
|
+
//! </ul>
|
99
159
|
inline void throw_runtime_error(const char* str)
|
100
160
|
{
|
101
161
|
throw std::runtime_error(str);
|
@@ -0,0 +1,169 @@
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
2
|
+
//
|
3
|
+
// (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost
|
4
|
+
// Software License, Version 1.0. (See accompanying file
|
5
|
+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
6
|
+
//
|
7
|
+
// See http://www.boost.org/libs/container for documentation.
|
8
|
+
//
|
9
|
+
//////////////////////////////////////////////////////////////////////////////
|
10
|
+
|
11
|
+
#ifndef BOOST_CONTAINER_USES_ALLOCATOR_HPP
|
12
|
+
#define BOOST_CONTAINER_USES_ALLOCATOR_HPP
|
13
|
+
|
14
|
+
#include <boost/container/uses_allocator_fwd.hpp>
|
15
|
+
#include <boost/container/detail/type_traits.hpp>
|
16
|
+
|
17
|
+
namespace boost {
|
18
|
+
namespace container {
|
19
|
+
|
20
|
+
//! <b>Remark</b>: if a specialization constructible_with_allocator_suffix<X>::value is true, indicates that T may be constructed
|
21
|
+
//! with an allocator as its last constructor argument. Ideally, all constructors of T (including the
|
22
|
+
//! copy and move constructors) should have a variant that accepts a final argument of
|
23
|
+
//! allocator_type.
|
24
|
+
//!
|
25
|
+
//! <b>Requires</b>: if a specialization constructible_with_allocator_suffix<X>::value is true, T must have a nested type,
|
26
|
+
//! allocator_type and at least one constructor for which allocator_type is the last
|
27
|
+
//! parameter. If not all constructors of T can be called with a final allocator_type argument,
|
28
|
+
//! and if T is used in a context where a container must call such a constructor, then the program is
|
29
|
+
//! ill-formed.
|
30
|
+
//!
|
31
|
+
//! <code>
|
32
|
+
//! template <class T, class Allocator = allocator<T> >
|
33
|
+
//! class Z {
|
34
|
+
//! public:
|
35
|
+
//! typedef Allocator allocator_type;
|
36
|
+
//!
|
37
|
+
//! // Default constructor with optional allocator suffix
|
38
|
+
//! Z(const allocator_type& a = allocator_type());
|
39
|
+
//!
|
40
|
+
//! // Copy constructor and allocator-extended copy constructor
|
41
|
+
//! Z(const Z& zz);
|
42
|
+
//! Z(const Z& zz, const allocator_type& a);
|
43
|
+
//! };
|
44
|
+
//!
|
45
|
+
//! // Specialize trait for class template Z
|
46
|
+
//! template <class T, class Allocator = allocator<T> >
|
47
|
+
//! struct constructible_with_allocator_suffix<Z<T,Allocator> >
|
48
|
+
//! { static const bool value = true; };
|
49
|
+
//! </code>
|
50
|
+
//!
|
51
|
+
//! <b>Note</b>: This trait is a workaround inspired by "N2554: The Scoped A Model (Rev 2)"
|
52
|
+
//! (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as
|
53
|
+
//! in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments.
|
54
|
+
//! Applications aiming portability with several compilers should always define this trait.
|
55
|
+
//!
|
56
|
+
//! In conforming C++11 compilers or compilers supporting SFINAE expressions
|
57
|
+
//! (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used
|
58
|
+
//! to detect if a type should be constructed with suffix or prefix allocator arguments.
|
59
|
+
template <class T>
|
60
|
+
struct constructible_with_allocator_suffix
|
61
|
+
{ static const bool value = false; };
|
62
|
+
|
63
|
+
//! <b>Remark</b>: if a specialization constructible_with_allocator_prefix<X>::value is true, indicates that T may be constructed
|
64
|
+
//! with allocator_arg and T::allocator_type as its first two constructor arguments.
|
65
|
+
//! Ideally, all constructors of T (including the copy and move constructors) should have a variant
|
66
|
+
//! that accepts these two initial arguments.
|
67
|
+
//!
|
68
|
+
//! <b>Requires</b>: specialization constructible_with_allocator_prefix<X>::value is true, T must have a nested type,
|
69
|
+
//! allocator_type and at least one constructor for which allocator_arg_t is the first
|
70
|
+
//! parameter and allocator_type is the second parameter. If not all constructors of T can be
|
71
|
+
//! called with these initial arguments, and if T is used in a context where a container must call such
|
72
|
+
//! a constructor, then the program is ill-formed.
|
73
|
+
//!
|
74
|
+
//! <code>
|
75
|
+
//! template <class T, class Allocator = allocator<T> >
|
76
|
+
//! class Y {
|
77
|
+
//! public:
|
78
|
+
//! typedef Allocator allocator_type;
|
79
|
+
//!
|
80
|
+
//! // Default constructor with and allocator-extended default constructor
|
81
|
+
//! Y();
|
82
|
+
//! Y(allocator_arg_t, const allocator_type& a);
|
83
|
+
//!
|
84
|
+
//! // Copy constructor and allocator-extended copy constructor
|
85
|
+
//! Y(const Y& yy);
|
86
|
+
//! Y(allocator_arg_t, const allocator_type& a, const Y& yy);
|
87
|
+
//!
|
88
|
+
//! // Variadic constructor and allocator-extended variadic constructor
|
89
|
+
//! template<class ...Args> Y(Args&& args...);
|
90
|
+
//! template<class ...Args>
|
91
|
+
//! Y(allocator_arg_t, const allocator_type& a, BOOST_FWD_REF(Args)... args);
|
92
|
+
//! };
|
93
|
+
//!
|
94
|
+
//! // Specialize trait for class template Y
|
95
|
+
//! template <class T, class Allocator = allocator<T> >
|
96
|
+
//! struct constructible_with_allocator_prefix<Y<T,Allocator> >
|
97
|
+
//! { static const bool value = true; };
|
98
|
+
//!
|
99
|
+
//! </code>
|
100
|
+
//!
|
101
|
+
//! <b>Note</b>: This trait is a workaround inspired by "N2554: The Scoped Allocator Model (Rev 2)"
|
102
|
+
//! (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as
|
103
|
+
//! in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments.
|
104
|
+
//! Applications aiming portability with several compilers should always define this trait.
|
105
|
+
//!
|
106
|
+
//! In conforming C++11 compilers or compilers supporting SFINAE expressions
|
107
|
+
//! (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used
|
108
|
+
//! to detect if a type should be constructed with suffix or prefix allocator arguments.
|
109
|
+
template <class T>
|
110
|
+
struct constructible_with_allocator_prefix
|
111
|
+
{ static const bool value = false; };
|
112
|
+
|
113
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
114
|
+
|
115
|
+
namespace container_detail {
|
116
|
+
|
117
|
+
template<typename T, typename Allocator>
|
118
|
+
struct uses_allocator_imp
|
119
|
+
{
|
120
|
+
// Use SFINAE (Substitution Failure Is Not An Error) to detect the
|
121
|
+
// presence of an 'allocator_type' nested type convertilble from Allocator.
|
122
|
+
private:
|
123
|
+
typedef char yes_type;
|
124
|
+
struct no_type{ char dummy[2]; };
|
125
|
+
|
126
|
+
// Match this function if T::allocator_type exists and is
|
127
|
+
// implicitly convertible from Allocator
|
128
|
+
template <class U>
|
129
|
+
static yes_type test(typename U::allocator_type);
|
130
|
+
|
131
|
+
// Match this function if T::allocator_type exists and it's type is `erased_type`.
|
132
|
+
template <class U, class V>
|
133
|
+
static typename container_detail::enable_if
|
134
|
+
< container_detail::is_same<typename U::allocator_type, erased_type>
|
135
|
+
, yes_type
|
136
|
+
>::type test(const V&);
|
137
|
+
|
138
|
+
// Match this function if TypeT::allocator_type does not exist or is
|
139
|
+
// not convertible from Allocator.
|
140
|
+
template <typename U>
|
141
|
+
static no_type test(...);
|
142
|
+
static Allocator alloc; // Declared but not defined
|
143
|
+
|
144
|
+
public:
|
145
|
+
static const bool value = sizeof(test<T>(alloc)) == sizeof(yes_type);
|
146
|
+
};
|
147
|
+
|
148
|
+
} //namespace container_detail {
|
149
|
+
|
150
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
151
|
+
|
152
|
+
//! <b>Remark</b>: Automatically detects whether T has a nested allocator_type that is convertible from
|
153
|
+
//! Allocator. Meets the BinaryTypeTrait requirements ([meta.rqmts] 20.4.1). A program may
|
154
|
+
//! specialize this type to define uses_allocator<X>::value as true for a T of user-defined type if T does not
|
155
|
+
//! have a nested allocator_type but is nonetheless constructible using the specified Allocator where either:
|
156
|
+
//! the first argument of a constructor has type allocator_arg_t and the second argument has type Alloc or
|
157
|
+
//! the last argument of a constructor has type Alloc.
|
158
|
+
//!
|
159
|
+
//! <b>Result</b>: uses_allocator<T, Allocator>::value== true if a type T::allocator_type
|
160
|
+
//! exists and either is_convertible<Alloc, T::allocator_type>::value != false or T::allocator_type
|
161
|
+
//! is an alias `erased_type`. False otherwise.
|
162
|
+
template <typename T, typename Allocator>
|
163
|
+
struct uses_allocator
|
164
|
+
: container_detail::uses_allocator_imp<T, Allocator>
|
165
|
+
{};
|
166
|
+
|
167
|
+
}} //namespace boost::container
|
168
|
+
|
169
|
+
#endif //BOOST_CONTAINER_USES_ALLOCATOR_HPP
|
@@ -0,0 +1,73 @@
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
2
|
+
//
|
3
|
+
// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
|
4
|
+
// Software License, Version 1.0. (See accompanying file
|
5
|
+
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
6
|
+
//
|
7
|
+
// See http://www.boost.org/libs/container for documentation.
|
8
|
+
//
|
9
|
+
//////////////////////////////////////////////////////////////////////////////
|
10
|
+
|
11
|
+
#ifndef BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
|
12
|
+
#define BOOST_CONTAINER_USES_ALLOCATOR_FWD_HPP
|
13
|
+
|
14
|
+
#include <boost/container/detail/workaround.hpp>
|
15
|
+
#include <boost/container/detail/std_fwd.hpp>
|
16
|
+
|
17
|
+
//! \file
|
18
|
+
//! This header forward declares boost::container::constructible_with_allocator_prefix,
|
19
|
+
//! boost::container::constructible_with_allocator_suffix and
|
20
|
+
//! boost::container::uses_allocator. Also defines the following types:
|
21
|
+
|
22
|
+
namespace boost {
|
23
|
+
namespace container {
|
24
|
+
|
25
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
26
|
+
|
27
|
+
template <int Dummy = 0>
|
28
|
+
struct std_allocator_arg_holder
|
29
|
+
{
|
30
|
+
static ::std::allocator_arg_t *dummy;
|
31
|
+
};
|
32
|
+
|
33
|
+
template <int Dummy>
|
34
|
+
::std::allocator_arg_t *std_allocator_arg_holder<Dummy>::dummy;
|
35
|
+
|
36
|
+
typedef const std::allocator_arg_t & allocator_arg_t;
|
37
|
+
|
38
|
+
#else
|
39
|
+
|
40
|
+
//! The allocator_arg_t struct is an empty structure type used as a unique type to
|
41
|
+
//! disambiguate constructor and function overloading. Specifically, several types
|
42
|
+
//! have constructors with allocator_arg_t as the first argument, immediately followed
|
43
|
+
//! by an argument of a type that satisfies Allocator requirements
|
44
|
+
typedef unspecified allocator_arg_t;
|
45
|
+
|
46
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
47
|
+
|
48
|
+
//! The `erased_type` struct is an empty struct that serves as a placeholder for a type
|
49
|
+
//! T in situations where the actual type T is determined at runtime. For example,
|
50
|
+
//! the nested type, `allocator_type`, is an alias for `erased_type` in classes that
|
51
|
+
//! use type-erased allocators.
|
52
|
+
struct erased_type {};
|
53
|
+
|
54
|
+
//! A instance of type
|
55
|
+
//! allocator_arg_t
|
56
|
+
static allocator_arg_t allocator_arg = BOOST_CONTAINER_DOC1ST(unspecified, *std_allocator_arg_holder<>::dummy);
|
57
|
+
|
58
|
+
// @cond
|
59
|
+
|
60
|
+
template <class T>
|
61
|
+
struct constructible_with_allocator_suffix;
|
62
|
+
|
63
|
+
template <class T>
|
64
|
+
struct constructible_with_allocator_prefix;
|
65
|
+
|
66
|
+
template <typename T, typename Allocator>
|
67
|
+
struct uses_allocator;
|
68
|
+
|
69
|
+
// @endcond
|
70
|
+
|
71
|
+
}} // namespace boost { namespace container {
|
72
|
+
|
73
|
+
#endif //BOOST_CONTAINER_USES_ALLOCATOR_HPP
|
@@ -1,6 +1,6 @@
|
|
1
1
|
//////////////////////////////////////////////////////////////////////////////
|
2
2
|
//
|
3
|
-
// (C) Copyright Ion Gaztanaga 2005-
|
3
|
+
// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
|
4
4
|
// Software License, Version 1.0. (See accompanying file
|
5
5
|
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
6
6
|
//
|
@@ -11,49 +11,63 @@
|
|
11
11
|
#ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
|
12
12
|
#define BOOST_CONTAINER_CONTAINER_VECTOR_HPP
|
13
13
|
|
14
|
-
#
|
14
|
+
#ifndef BOOST_CONFIG_HPP
|
15
|
+
# include <boost/config.hpp>
|
16
|
+
#endif
|
17
|
+
|
18
|
+
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
15
19
|
# pragma once
|
16
20
|
#endif
|
17
21
|
|
18
22
|
#include <boost/container/detail/config_begin.hpp>
|
19
23
|
#include <boost/container/detail/workaround.hpp>
|
20
|
-
#include <boost/container/container_fwd.hpp>
|
21
24
|
|
22
|
-
|
23
|
-
#include <memory>
|
24
|
-
#include <algorithm>
|
25
|
-
#include <iterator>
|
26
|
-
#include <utility>
|
27
|
-
#include <boost/detail/no_exceptions_support.hpp>
|
28
|
-
#include <boost/type_traits/has_trivial_destructor.hpp>
|
29
|
-
#include <boost/type_traits/has_trivial_copy.hpp>
|
30
|
-
#include <boost/type_traits/has_trivial_assign.hpp>
|
31
|
-
#include <boost/type_traits/has_nothrow_copy.hpp>
|
32
|
-
#include <boost/type_traits/has_nothrow_assign.hpp>
|
33
|
-
#include <boost/type_traits/has_nothrow_constructor.hpp>
|
25
|
+
// container
|
34
26
|
#include <boost/container/container_fwd.hpp>
|
35
|
-
#include <boost/container/detail/version_type.hpp>
|
36
|
-
#include <boost/container/detail/allocation_type.hpp>
|
37
|
-
#include <boost/container/detail/utilities.hpp>
|
38
|
-
#include <boost/container/detail/iterators.hpp>
|
39
|
-
#include <boost/container/detail/algorithms.hpp>
|
40
|
-
#include <boost/container/detail/destroyers.hpp>
|
41
27
|
#include <boost/container/allocator_traits.hpp>
|
42
|
-
#include <boost/container/
|
28
|
+
#include <boost/container/new_allocator.hpp> //new_allocator
|
43
29
|
#include <boost/container/throw_exception.hpp>
|
44
|
-
|
45
|
-
#include <boost/
|
46
|
-
#include <boost/
|
47
|
-
#include <boost/
|
30
|
+
// container detail
|
31
|
+
#include <boost/container/detail/advanced_insert_int.hpp>
|
32
|
+
#include <boost/container/detail/algorithm.hpp> //equal()
|
33
|
+
#include <boost/container/detail/alloc_helpers.hpp>
|
34
|
+
#include <boost/container/detail/allocation_type.hpp>
|
35
|
+
#include <boost/container/detail/copy_move_algo.hpp>
|
36
|
+
#include <boost/container/detail/destroyers.hpp>
|
37
|
+
#include <boost/container/detail/iterator.hpp>
|
38
|
+
#include <boost/container/detail/iterators.hpp>
|
39
|
+
#include <boost/container/detail/iterator_to_raw_pointer.hpp>
|
48
40
|
#include <boost/container/detail/mpl.hpp>
|
41
|
+
#include <boost/container/detail/next_capacity.hpp>
|
42
|
+
#include <boost/container/detail/to_raw_pointer.hpp>
|
49
43
|
#include <boost/container/detail/type_traits.hpp>
|
50
|
-
#include <boost/container/detail/
|
44
|
+
#include <boost/container/detail/version_type.hpp>
|
45
|
+
// intrusive
|
46
|
+
#include <boost/intrusive/pointer_traits.hpp>
|
47
|
+
// move
|
48
|
+
#include <boost/move/adl_move_swap.hpp>
|
49
|
+
#include <boost/move/iterator.hpp>
|
50
|
+
#include <boost/move/traits.hpp>
|
51
|
+
#include <boost/move/utility_core.hpp>
|
52
|
+
// move/detail
|
53
|
+
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
54
|
+
#include <boost/move/detail/fwd_macros.hpp>
|
55
|
+
#endif
|
56
|
+
#include <boost/move/detail/move_helpers.hpp>
|
57
|
+
// other
|
58
|
+
#include <boost/core/no_exceptions_support.hpp>
|
51
59
|
#include <boost/assert.hpp>
|
60
|
+
#include <boost/cstdint.hpp>
|
61
|
+
|
62
|
+
//std
|
63
|
+
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
64
|
+
#include <initializer_list> //for std::initializer_list
|
65
|
+
#endif
|
52
66
|
|
53
67
|
namespace boost {
|
54
68
|
namespace container {
|
55
69
|
|
56
|
-
|
70
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
57
71
|
|
58
72
|
//#define BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
|
59
73
|
|
@@ -61,178 +75,183 @@ namespace container_detail {
|
|
61
75
|
|
62
76
|
#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
|
63
77
|
|
64
|
-
|
65
|
-
|
66
|
-
class vector_const_iterator
|
78
|
+
template <class Pointer, bool IsConst>
|
79
|
+
class vec_iterator
|
67
80
|
{
|
68
81
|
public:
|
69
|
-
|
82
|
+
typedef std::random_access_iterator_tag iterator_category;
|
70
83
|
typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
|
71
84
|
typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
|
72
|
-
typedef typename
|
73
|
-
|
74
|
-
|
85
|
+
typedef typename if_c
|
86
|
+
< IsConst
|
87
|
+
, typename boost::intrusive::pointer_traits<Pointer>::template
|
88
|
+
rebind_pointer<const value_type>::type
|
89
|
+
, Pointer
|
90
|
+
>::type pointer;
|
91
|
+
typedef typename boost::intrusive::pointer_traits<pointer> ptr_traits;
|
92
|
+
typedef typename ptr_traits::reference reference;
|
75
93
|
|
76
|
-
|
77
|
-
|
94
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
95
|
+
private:
|
78
96
|
Pointer m_ptr;
|
79
97
|
|
80
98
|
public:
|
81
|
-
const Pointer &get_ptr() const
|
99
|
+
const Pointer &get_ptr() const BOOST_NOEXCEPT_OR_NOTHROW
|
82
100
|
{ return m_ptr; }
|
83
101
|
|
84
|
-
Pointer &get_ptr()
|
102
|
+
Pointer &get_ptr() BOOST_NOEXCEPT_OR_NOTHROW
|
85
103
|
{ return m_ptr; }
|
86
104
|
|
87
|
-
explicit
|
105
|
+
explicit vec_iterator(Pointer ptr) BOOST_NOEXCEPT_OR_NOTHROW
|
88
106
|
: m_ptr(ptr)
|
89
107
|
{}
|
90
|
-
|
108
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
91
109
|
|
92
110
|
public:
|
93
111
|
|
94
112
|
//Constructors
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
113
|
+
vec_iterator() BOOST_NOEXCEPT_OR_NOTHROW
|
114
|
+
: m_ptr() //Value initialization to achieve "null iterators" (N3644)
|
115
|
+
{}
|
116
|
+
|
117
|
+
vec_iterator(vec_iterator<Pointer, false> const& other) BOOST_NOEXCEPT_OR_NOTHROW
|
118
|
+
: m_ptr(other.get_ptr())
|
101
119
|
{}
|
102
120
|
|
103
121
|
//Pointer like operators
|
104
|
-
reference operator*() const
|
122
|
+
reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
|
105
123
|
{ return *m_ptr; }
|
106
124
|
|
107
|
-
|
108
|
-
{ return
|
125
|
+
pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
|
126
|
+
{ return ::boost::intrusive::pointer_traits<pointer>::pointer_to(this->operator*()); }
|
109
127
|
|
110
|
-
reference operator[](difference_type off) const
|
128
|
+
reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
|
111
129
|
{ return m_ptr[off]; }
|
112
130
|
|
113
131
|
//Increment / Decrement
|
114
|
-
|
132
|
+
vec_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
|
115
133
|
{ ++m_ptr; return *this; }
|
116
134
|
|
117
|
-
|
118
|
-
{ return
|
135
|
+
vec_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
|
136
|
+
{ return vec_iterator(m_ptr++); }
|
119
137
|
|
120
|
-
|
138
|
+
vec_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
|
121
139
|
{ --m_ptr; return *this; }
|
122
140
|
|
123
|
-
|
124
|
-
{ return
|
141
|
+
vec_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
|
142
|
+
{ return vec_iterator(m_ptr--); }
|
125
143
|
|
126
144
|
//Arithmetic
|
127
|
-
|
145
|
+
vec_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
128
146
|
{ m_ptr += off; return *this; }
|
129
147
|
|
130
|
-
|
148
|
+
vec_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
131
149
|
{ m_ptr -= off; return *this; }
|
132
150
|
|
133
|
-
friend
|
134
|
-
{ return
|
151
|
+
friend vec_iterator operator+(const vec_iterator &x, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
152
|
+
{ return vec_iterator(x.m_ptr+off); }
|
135
153
|
|
136
|
-
friend
|
154
|
+
friend vec_iterator operator+(difference_type off, vec_iterator right) BOOST_NOEXCEPT_OR_NOTHROW
|
137
155
|
{ right.m_ptr += off; return right; }
|
138
156
|
|
139
|
-
friend
|
157
|
+
friend vec_iterator operator-(vec_iterator left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
|
140
158
|
{ left.m_ptr -= off; return left; }
|
141
159
|
|
142
|
-
friend difference_type operator-(const
|
160
|
+
friend difference_type operator-(const vec_iterator &left, const vec_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
|
143
161
|
{ return left.m_ptr - right.m_ptr; }
|
144
162
|
|
145
163
|
//Comparison operators
|
146
|
-
friend bool operator== (const
|
164
|
+
friend bool operator== (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
147
165
|
{ return l.m_ptr == r.m_ptr; }
|
148
166
|
|
149
|
-
friend bool operator!= (const
|
167
|
+
friend bool operator!= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
150
168
|
{ return l.m_ptr != r.m_ptr; }
|
151
169
|
|
152
|
-
friend bool operator< (const
|
170
|
+
friend bool operator< (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
153
171
|
{ return l.m_ptr < r.m_ptr; }
|
154
172
|
|
155
|
-
friend bool operator<= (const
|
173
|
+
friend bool operator<= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
156
174
|
{ return l.m_ptr <= r.m_ptr; }
|
157
175
|
|
158
|
-
friend bool operator> (const
|
176
|
+
friend bool operator> (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
159
177
|
{ return l.m_ptr > r.m_ptr; }
|
160
178
|
|
161
|
-
friend bool operator>= (const
|
179
|
+
friend bool operator>= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
|
162
180
|
{ return l.m_ptr >= r.m_ptr; }
|
163
181
|
};
|
164
182
|
|
165
|
-
|
166
|
-
|
167
|
-
class vector_iterator
|
168
|
-
: public vector_const_iterator<Pointer>
|
183
|
+
template<class BiDirPosConstIt, class BiDirValueIt>
|
184
|
+
struct vector_insert_ordered_cursor
|
169
185
|
{
|
170
|
-
typedef
|
171
|
-
|
172
|
-
explicit vector_iterator(Pointer ptr) BOOST_CONTAINER_NOEXCEPT
|
173
|
-
: base_t(ptr)
|
174
|
-
{}
|
186
|
+
typedef typename iterator_traits<BiDirPosConstIt>::value_type size_type;
|
187
|
+
typedef typename iterator_traits<BiDirValueIt>::reference reference;
|
175
188
|
|
176
|
-
|
177
|
-
|
178
|
-
typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
|
179
|
-
typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
|
180
|
-
typedef Pointer pointer;
|
181
|
-
typedef value_type& reference;
|
182
|
-
|
183
|
-
//Constructors
|
184
|
-
vector_iterator() BOOST_CONTAINER_NOEXCEPT
|
185
|
-
: base_t()
|
189
|
+
vector_insert_ordered_cursor(BiDirPosConstIt posit, BiDirValueIt valueit)
|
190
|
+
: last_position_it(posit), last_value_it(valueit)
|
186
191
|
{}
|
187
192
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
193
|
+
void operator --()
|
194
|
+
{
|
195
|
+
--last_value_it;
|
196
|
+
--last_position_it;
|
197
|
+
while(this->get_pos() == size_type(-1)){
|
198
|
+
--last_value_it;
|
199
|
+
--last_position_it;
|
200
|
+
}
|
201
|
+
}
|
194
202
|
|
195
|
-
|
196
|
-
{ return
|
203
|
+
size_type get_pos() const
|
204
|
+
{ return *last_position_it; }
|
197
205
|
|
198
|
-
|
199
|
-
|
200
|
-
{ ++this->m_ptr; return *this; }
|
206
|
+
reference get_val()
|
207
|
+
{ return *last_value_it; }
|
201
208
|
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
vector_iterator& operator--() BOOST_CONTAINER_NOEXCEPT
|
206
|
-
{ --this->m_ptr; return *this; }
|
209
|
+
BiDirPosConstIt last_position_it;
|
210
|
+
BiDirValueIt last_value_it;
|
211
|
+
};
|
207
212
|
|
208
|
-
|
209
|
-
|
213
|
+
template<class T, class SizeType, class BiDirValueIt, class Comp>
|
214
|
+
struct vector_merge_cursor
|
215
|
+
{
|
216
|
+
typedef SizeType size_type;
|
217
|
+
typedef typename iterator_traits<BiDirValueIt>::reference reference;
|
210
218
|
|
211
|
-
|
212
|
-
|
213
|
-
{
|
219
|
+
vector_merge_cursor(T *pbeg, T *plast, BiDirValueIt valueit, Comp &cmp)
|
220
|
+
: m_pbeg(pbeg), m_pcur(--plast), m_valueit(valueit), m_cmp(cmp)
|
221
|
+
{}
|
214
222
|
|
215
|
-
|
216
|
-
{
|
223
|
+
void operator --()
|
224
|
+
{
|
225
|
+
--m_valueit;
|
226
|
+
const T &t = *m_valueit;
|
227
|
+
while((m_pcur + 1) != m_pbeg){
|
228
|
+
if(!m_cmp(t, *m_pcur)){
|
229
|
+
break;
|
230
|
+
}
|
231
|
+
--m_pcur;
|
232
|
+
}
|
233
|
+
}
|
217
234
|
|
218
|
-
|
219
|
-
{
|
235
|
+
size_type get_pos() const
|
236
|
+
{ return static_cast<size_type>((m_pcur + 1) - m_pbeg); }
|
220
237
|
|
221
|
-
|
222
|
-
{
|
238
|
+
reference get_val()
|
239
|
+
{ return *m_valueit; }
|
223
240
|
|
224
|
-
|
225
|
-
|
241
|
+
T *const m_pbeg;
|
242
|
+
T *m_pcur;
|
243
|
+
BiDirValueIt m_valueit;
|
244
|
+
Comp &m_cmp;
|
226
245
|
};
|
227
246
|
|
228
247
|
} //namespace container_detail {
|
229
248
|
|
230
|
-
template<class Pointer>
|
231
|
-
const Pointer &vector_iterator_get_ptr(const container_detail::
|
249
|
+
template<class Pointer, bool IsConst>
|
250
|
+
const Pointer &vector_iterator_get_ptr(const container_detail::vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
|
232
251
|
{ return it.get_ptr(); }
|
233
252
|
|
234
|
-
template<class Pointer>
|
235
|
-
Pointer &get_ptr(container_detail::
|
253
|
+
template<class Pointer, bool IsConst>
|
254
|
+
Pointer &get_ptr(container_detail::vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
|
236
255
|
{ return it.get_ptr(); }
|
237
256
|
|
238
257
|
namespace container_detail {
|
@@ -251,7 +270,7 @@ struct vector_get_ptr_pointer_to_non_const
|
|
251
270
|
typedef typename pointer_traits_t
|
252
271
|
::template rebind_pointer<non_const_element_type>::type return_type;
|
253
272
|
|
254
|
-
static return_type get_ptr(const const_pointer &ptr)
|
273
|
+
static return_type get_ptr(const const_pointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
|
255
274
|
{ return boost::intrusive::pointer_traits<return_type>::const_cast_from(ptr); }
|
256
275
|
};
|
257
276
|
|
@@ -259,7 +278,7 @@ template<class Pointer>
|
|
259
278
|
struct vector_get_ptr_pointer_to_non_const<Pointer, false>
|
260
279
|
{
|
261
280
|
typedef const Pointer & return_type;
|
262
|
-
static return_type get_ptr(const Pointer &ptr)
|
281
|
+
static return_type get_ptr(const Pointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
|
263
282
|
{ return ptr; }
|
264
283
|
};
|
265
284
|
|
@@ -267,7 +286,7 @@ struct vector_get_ptr_pointer_to_non_const<Pointer, false>
|
|
267
286
|
|
268
287
|
template<class MaybeConstPointer>
|
269
288
|
typename container_detail::vector_get_ptr_pointer_to_non_const<MaybeConstPointer>::return_type
|
270
|
-
vector_iterator_get_ptr(const MaybeConstPointer &ptr)
|
289
|
+
vector_iterator_get_ptr(const MaybeConstPointer &ptr) BOOST_NOEXCEPT_OR_NOTHROW
|
271
290
|
{
|
272
291
|
return container_detail::vector_get_ptr_pointer_to_non_const<MaybeConstPointer>::get_ptr(ptr);
|
273
292
|
}
|
@@ -276,46 +295,40 @@ namespace container_detail {
|
|
276
295
|
|
277
296
|
#endif //#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
|
278
297
|
|
279
|
-
|
280
|
-
|
298
|
+
struct uninitialized_size_t {};
|
299
|
+
static const uninitialized_size_t uninitialized_size = uninitialized_size_t();
|
300
|
+
|
301
|
+
template <class T>
|
302
|
+
struct vector_value_traits_base
|
281
303
|
{
|
282
|
-
|
283
|
-
|
284
|
-
static const bool
|
285
|
-
static const bool
|
286
|
-
static const bool
|
287
|
-
static const bool
|
288
|
-
|
289
|
-
|
304
|
+
static const bool trivial_dctr = is_trivially_destructible<T>::value;
|
305
|
+
static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<T>::value;
|
306
|
+
static const bool trivial_copy = is_trivially_copy_constructible<T>::value;
|
307
|
+
static const bool nothrow_copy = is_nothrow_copy_constructible<T>::value || trivial_copy;
|
308
|
+
static const bool trivial_assign = is_trivially_copy_assignable<T>::value;
|
309
|
+
static const bool nothrow_assign = is_nothrow_copy_assignable<T>::value || trivial_assign;
|
310
|
+
};
|
311
|
+
|
290
312
|
|
313
|
+
template <class Allocator>
|
314
|
+
struct vector_value_traits
|
315
|
+
: public vector_value_traits_base<typename Allocator::value_type>
|
316
|
+
{
|
317
|
+
typedef vector_value_traits_base<typename Allocator::value_type> base_t;
|
291
318
|
//This is the anti-exception array destructor
|
292
319
|
//to deallocate values already constructed
|
293
320
|
typedef typename container_detail::if_c
|
294
|
-
<trivial_dctr
|
295
|
-
,container_detail::null_scoped_destructor_n<Allocator>
|
296
|
-
,container_detail::scoped_destructor_n<Allocator>
|
297
|
-
>::type OldArrayDestructor;
|
298
|
-
//This is the anti-exception array destructor
|
299
|
-
//to destroy objects created with copy construction
|
300
|
-
typedef typename container_detail::if_c
|
301
|
-
<nothrow_copy
|
321
|
+
<base_t::trivial_dctr
|
302
322
|
,container_detail::null_scoped_destructor_n<Allocator>
|
303
323
|
,container_detail::scoped_destructor_n<Allocator>
|
304
324
|
>::type ArrayDestructor;
|
305
325
|
//This is the anti-exception array deallocator
|
306
|
-
typedef
|
307
|
-
<nothrow_copy
|
308
|
-
,container_detail::null_scoped_array_deallocator<Allocator>
|
309
|
-
,container_detail::scoped_array_deallocator<Allocator>
|
310
|
-
>::type ArrayDeallocator;
|
326
|
+
typedef container_detail::scoped_array_deallocator<Allocator> ArrayDeallocator;
|
311
327
|
};
|
312
328
|
|
313
329
|
//!This struct deallocates and allocated memory
|
314
330
|
template < class Allocator
|
315
|
-
, class AllocatorVersion = container_detail::
|
316
|
-
< unsigned
|
317
|
-
, boost::container::container_detail::version<Allocator>::value
|
318
|
-
>
|
331
|
+
, class AllocatorVersion = typename container_detail::version<Allocator>::type
|
319
332
|
>
|
320
333
|
struct vector_alloc_holder
|
321
334
|
: public Allocator
|
@@ -324,43 +337,69 @@ struct vector_alloc_holder
|
|
324
337
|
BOOST_MOVABLE_BUT_NOT_COPYABLE(vector_alloc_holder)
|
325
338
|
|
326
339
|
public:
|
340
|
+
typedef Allocator allocator_type;
|
327
341
|
typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
|
328
342
|
typedef typename allocator_traits_type::pointer pointer;
|
329
343
|
typedef typename allocator_traits_type::size_type size_type;
|
330
344
|
typedef typename allocator_traits_type::value_type value_type;
|
331
345
|
|
346
|
+
static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
|
347
|
+
{
|
348
|
+
(void)propagate_allocator; (void)p; (void)to_alloc; (void)from_alloc;
|
349
|
+
const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
|
350
|
+
!allocator_traits_type::storage_is_unpropagable(from_alloc, p);
|
351
|
+
return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(from_alloc, to_alloc));
|
352
|
+
}
|
353
|
+
|
354
|
+
static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator)
|
355
|
+
{
|
356
|
+
(void)propagate_allocator; (void)l_p; (void)r_p; (void)l_a; (void)r_a;
|
357
|
+
const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
|
358
|
+
!(allocator_traits_type::storage_is_unpropagable(l_a, l_p) || allocator_traits_type::storage_is_unpropagable(r_a, r_p));
|
359
|
+
return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(l_a, r_a));
|
360
|
+
}
|
361
|
+
|
332
362
|
//Constructor, does not throw
|
333
363
|
vector_alloc_holder()
|
334
|
-
|
364
|
+
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
|
335
365
|
: Allocator(), m_start(), m_size(), m_capacity()
|
336
366
|
{}
|
337
367
|
|
338
368
|
//Constructor, does not throw
|
339
369
|
template<class AllocConvertible>
|
340
|
-
explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a)
|
370
|
+
explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
|
341
371
|
: Allocator(boost::forward<AllocConvertible>(a)), m_start(), m_size(), m_capacity()
|
342
372
|
{}
|
343
373
|
|
344
374
|
//Constructor, does not throw
|
345
375
|
template<class AllocConvertible>
|
346
|
-
|
376
|
+
vector_alloc_holder(uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
|
347
377
|
: Allocator(boost::forward<AllocConvertible>(a))
|
378
|
+
, m_start()
|
348
379
|
, m_size(initial_size) //Size is initialized here so vector should only call uninitialized_xxx after this
|
380
|
+
, m_capacity()
|
349
381
|
{
|
350
|
-
|
382
|
+
if(initial_size){
|
383
|
+
pointer reuse = 0;
|
384
|
+
m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse);
|
385
|
+
}
|
351
386
|
}
|
352
387
|
|
353
388
|
//Constructor, does not throw
|
354
|
-
|
389
|
+
vector_alloc_holder(uninitialized_size_t, size_type initial_size)
|
355
390
|
: Allocator()
|
391
|
+
, m_start()
|
356
392
|
, m_size(initial_size) //Size is initialized here so vector should only call uninitialized_xxx after this
|
393
|
+
, m_capacity()
|
357
394
|
{
|
358
|
-
|
359
|
-
|
395
|
+
if(initial_size){
|
396
|
+
pointer reuse = 0;
|
397
|
+
m_start = this->allocation_command(allocate_new, initial_size, m_capacity = initial_size, reuse);
|
398
|
+
}
|
360
399
|
}
|
361
400
|
|
362
|
-
vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder)
|
363
|
-
: Allocator(
|
401
|
+
vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder) BOOST_NOEXCEPT_OR_NOTHROW
|
402
|
+
: Allocator(BOOST_MOVE_BASE(Allocator, holder))
|
364
403
|
, m_start(holder.m_start)
|
365
404
|
, m_size(holder.m_size)
|
366
405
|
, m_capacity(holder.m_capacity)
|
@@ -369,53 +408,100 @@ struct vector_alloc_holder
|
|
369
408
|
holder.m_size = holder.m_capacity = 0;
|
370
409
|
}
|
371
410
|
|
372
|
-
|
411
|
+
vector_alloc_holder(pointer p, size_type capacity, BOOST_RV_REF(vector_alloc_holder) holder)
|
412
|
+
: Allocator(BOOST_MOVE_BASE(Allocator, holder))
|
413
|
+
, m_start(p)
|
414
|
+
, m_size(holder.m_size)
|
415
|
+
, m_capacity(capacity)
|
373
416
|
{
|
374
|
-
|
375
|
-
|
417
|
+
allocator_type &this_alloc = this->alloc();
|
418
|
+
allocator_type &x_alloc = holder.alloc();
|
419
|
+
if(this->is_propagable_from(x_alloc, holder.start(), this_alloc, true)){
|
420
|
+
if(this->m_capacity){
|
421
|
+
this->alloc().deallocate(this->m_start, this->m_capacity);
|
422
|
+
}
|
423
|
+
m_start = holder.m_start;
|
424
|
+
m_capacity = holder.m_capacity;
|
425
|
+
holder.m_start = pointer();
|
426
|
+
holder.m_capacity = holder.m_size = 0;
|
427
|
+
}
|
428
|
+
else if(this->m_capacity < holder.m_size){
|
429
|
+
size_type const n = holder.m_size;
|
430
|
+
pointer reuse = pointer();
|
431
|
+
m_start = this->allocation_command(allocate_new, n, m_capacity = n, reuse);
|
432
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
433
|
+
this->num_alloc += n != 0;
|
434
|
+
#endif
|
435
|
+
}
|
376
436
|
}
|
377
437
|
|
378
|
-
|
379
|
-
|
438
|
+
vector_alloc_holder(pointer p, size_type n)
|
439
|
+
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
|
440
|
+
: Allocator()
|
441
|
+
, m_start(p)
|
442
|
+
, m_size()
|
443
|
+
, m_capacity(n)
|
444
|
+
{}
|
445
|
+
|
446
|
+
template<class AllocFwd>
|
447
|
+
vector_alloc_holder(pointer p, size_type n, BOOST_FWD_REF(AllocFwd) a)
|
448
|
+
: Allocator(::boost::forward<AllocFwd>(a))
|
449
|
+
, m_start(p)
|
450
|
+
, m_size()
|
451
|
+
, m_capacity(n)
|
452
|
+
{}
|
380
453
|
|
381
|
-
~vector_alloc_holder()
|
454
|
+
~vector_alloc_holder() BOOST_NOEXCEPT_OR_NOTHROW
|
382
455
|
{
|
383
456
|
if(this->m_capacity){
|
384
457
|
this->alloc().deallocate(this->m_start, this->m_capacity);
|
385
458
|
}
|
386
459
|
}
|
387
460
|
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
461
|
+
pointer allocation_command(boost::container::allocation_type command,
|
462
|
+
size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
|
463
|
+
{
|
464
|
+
typedef typename container_detail::version<Allocator>::type alloc_version;
|
465
|
+
return this->priv_allocation_command(alloc_version(), command, limit_size, prefer_in_recvd_out_size, reuse);
|
466
|
+
}
|
467
|
+
|
468
|
+
bool try_expand_fwd(size_type at_least)
|
393
469
|
{
|
394
|
-
|
395
|
-
|
470
|
+
//There is not enough memory, try to expand the old one
|
471
|
+
const size_type new_cap = this->capacity() + at_least;
|
472
|
+
size_type real_cap = new_cap;
|
473
|
+
pointer reuse = this->start();
|
474
|
+
bool const success = !!this->allocation_command(expand_fwd, new_cap, real_cap, reuse);
|
475
|
+
//Check for forward expansion
|
476
|
+
if(success){
|
477
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
478
|
+
++this->num_expand_fwd;
|
479
|
+
#endif
|
480
|
+
this->capacity(real_cap);
|
481
|
+
}
|
482
|
+
return success;
|
396
483
|
}
|
397
484
|
|
398
485
|
size_type next_capacity(size_type additional_objects) const
|
399
486
|
{
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
, this->m_capacity, additional_objects);*/
|
487
|
+
return next_capacity_calculator
|
488
|
+
<size_type, NextCapacityDouble //NextCapacity60Percent
|
489
|
+
>::get( allocator_traits_type::max_size(this->alloc())
|
490
|
+
, this->m_capacity, additional_objects );
|
405
491
|
}
|
406
492
|
|
407
493
|
pointer m_start;
|
408
494
|
size_type m_size;
|
409
495
|
size_type m_capacity;
|
410
496
|
|
411
|
-
void
|
497
|
+
void swap_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
|
412
498
|
{
|
413
|
-
boost::
|
414
|
-
boost::
|
415
|
-
boost::
|
499
|
+
boost::adl_move_swap(this->m_start, x.m_start);
|
500
|
+
boost::adl_move_swap(this->m_size, x.m_size);
|
501
|
+
boost::adl_move_swap(this->m_capacity, x.m_capacity);
|
416
502
|
}
|
417
503
|
|
418
|
-
void
|
504
|
+
void steal_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
|
419
505
|
{
|
420
506
|
this->m_start = x.m_start;
|
421
507
|
this->m_size = x.m_size;
|
@@ -424,21 +510,55 @@ struct vector_alloc_holder
|
|
424
510
|
x.m_size = x.m_capacity = 0;
|
425
511
|
}
|
426
512
|
|
427
|
-
Allocator &alloc()
|
513
|
+
Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
|
428
514
|
{ return *this; }
|
429
515
|
|
430
|
-
const Allocator &alloc() const
|
516
|
+
const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
|
431
517
|
{ return *this; }
|
432
518
|
|
433
|
-
const pointer &start() const
|
434
|
-
const size_type &capacity() const
|
435
|
-
void start(const pointer &p)
|
436
|
-
void capacity(const size_type &c)
|
519
|
+
const pointer &start() const BOOST_NOEXCEPT_OR_NOTHROW { return m_start; }
|
520
|
+
const size_type &capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return m_capacity; }
|
521
|
+
void start(const pointer &p) BOOST_NOEXCEPT_OR_NOTHROW { m_start = p; }
|
522
|
+
void capacity(const size_type &c) BOOST_NOEXCEPT_OR_NOTHROW { m_capacity = c; }
|
523
|
+
|
524
|
+
private:
|
525
|
+
void priv_first_allocation(size_type cap)
|
526
|
+
{
|
527
|
+
if(cap){
|
528
|
+
pointer reuse = 0;
|
529
|
+
m_start = this->allocation_command(allocate_new, cap, cap, reuse);
|
530
|
+
m_capacity = cap;
|
531
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
532
|
+
++this->num_alloc;
|
533
|
+
#endif
|
534
|
+
}
|
535
|
+
}
|
536
|
+
|
537
|
+
pointer priv_allocation_command(version_1, boost::container::allocation_type command,
|
538
|
+
size_type ,
|
539
|
+
size_type &prefer_in_recvd_out_size,
|
540
|
+
pointer &reuse)
|
541
|
+
{
|
542
|
+
(void)command;
|
543
|
+
BOOST_ASSERT( (command & allocate_new));
|
544
|
+
BOOST_ASSERT(!(command & nothrow_allocation));
|
545
|
+
pointer const p = allocator_traits_type::allocate(this->alloc(), prefer_in_recvd_out_size, reuse);
|
546
|
+
reuse = pointer();
|
547
|
+
return p;
|
548
|
+
}
|
549
|
+
|
550
|
+
pointer priv_allocation_command(version_2, boost::container::allocation_type command,
|
551
|
+
size_type limit_size,
|
552
|
+
size_type &prefer_in_recvd_out_size,
|
553
|
+
pointer &reuse)
|
554
|
+
{
|
555
|
+
return this->alloc().allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
|
556
|
+
}
|
437
557
|
};
|
438
558
|
|
439
559
|
//!This struct deallocates and allocated memory
|
440
560
|
template <class Allocator>
|
441
|
-
struct vector_alloc_holder<Allocator,
|
561
|
+
struct vector_alloc_holder<Allocator, version_0>
|
442
562
|
: public Allocator
|
443
563
|
{
|
444
564
|
private:
|
@@ -455,35 +575,37 @@ struct vector_alloc_holder<Allocator, container_detail::integral_constant<unsign
|
|
455
575
|
|
456
576
|
//Constructor, does not throw
|
457
577
|
vector_alloc_holder()
|
458
|
-
|
578
|
+
BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible<Allocator>::value)
|
459
579
|
: Allocator(), m_size()
|
460
580
|
{}
|
461
581
|
|
462
582
|
//Constructor, does not throw
|
463
583
|
template<class AllocConvertible>
|
464
|
-
explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a)
|
584
|
+
explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
|
465
585
|
: Allocator(boost::forward<AllocConvertible>(a)), m_size()
|
466
586
|
{}
|
467
587
|
|
468
588
|
//Constructor, does not throw
|
469
589
|
template<class AllocConvertible>
|
470
|
-
|
590
|
+
vector_alloc_holder(uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
|
471
591
|
: Allocator(boost::forward<AllocConvertible>(a))
|
472
|
-
, m_size(initial_size) //Size is initialized here
|
592
|
+
, m_size(initial_size) //Size is initialized here...
|
473
593
|
{
|
474
|
-
|
594
|
+
//... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
|
595
|
+
this->priv_first_allocation(initial_size);
|
475
596
|
}
|
476
597
|
|
477
598
|
//Constructor, does not throw
|
478
|
-
|
599
|
+
vector_alloc_holder(uninitialized_size_t, size_type initial_size)
|
479
600
|
: Allocator()
|
480
|
-
, m_size(initial_size) //Size is initialized here
|
601
|
+
, m_size(initial_size) //Size is initialized here...
|
481
602
|
{
|
482
|
-
|
603
|
+
//... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
|
604
|
+
this->priv_first_allocation(initial_size);
|
483
605
|
}
|
484
606
|
|
485
607
|
vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder)
|
486
|
-
: Allocator(
|
608
|
+
: Allocator(BOOST_MOVE_BASE(Allocator, holder))
|
487
609
|
, m_size(holder.m_size) //Size is initialized here so vector should only call uninitialized_xxx after this
|
488
610
|
{
|
489
611
|
::boost::container::uninitialized_move_alloc_n
|
@@ -497,60 +619,62 @@ struct vector_alloc_holder<Allocator, container_detail::integral_constant<unsign
|
|
497
619
|
{
|
498
620
|
//Different allocator type so we must check we have enough storage
|
499
621
|
const size_type n = holder.m_size;
|
500
|
-
this->
|
622
|
+
this->priv_first_allocation(n);
|
501
623
|
::boost::container::uninitialized_move_alloc_n
|
502
624
|
(this->alloc(), container_detail::to_raw_pointer(holder.start()), n, container_detail::to_raw_pointer(this->start()));
|
503
625
|
}
|
504
626
|
|
505
|
-
void
|
627
|
+
void priv_first_allocation(size_type cap)
|
506
628
|
{
|
507
629
|
if(cap > Allocator::internal_capacity){
|
508
630
|
throw_bad_alloc();
|
509
631
|
}
|
510
632
|
}
|
511
633
|
|
512
|
-
void
|
513
|
-
{}
|
514
|
-
|
515
|
-
//Destructor
|
516
|
-
~vector_alloc_holder() BOOST_CONTAINER_NOEXCEPT
|
517
|
-
{}
|
518
|
-
|
519
|
-
void swap(vector_alloc_holder &x)
|
634
|
+
void deep_swap(vector_alloc_holder &x)
|
520
635
|
{
|
521
|
-
this->
|
636
|
+
this->priv_deep_swap(x);
|
522
637
|
}
|
523
638
|
|
524
639
|
template<class OtherAllocator, class OtherAllocatorVersion>
|
525
|
-
void
|
640
|
+
void deep_swap(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x)
|
526
641
|
{
|
527
642
|
if(this->m_size > OtherAllocator::internal_capacity || x.m_size > Allocator::internal_capacity){
|
528
643
|
throw_bad_alloc();
|
529
644
|
}
|
530
|
-
this->
|
645
|
+
this->priv_deep_swap(x);
|
646
|
+
}
|
647
|
+
|
648
|
+
void swap_resources(vector_alloc_holder &) BOOST_NOEXCEPT_OR_NOTHROW
|
649
|
+
{ //Containers with version 0 allocators can't be moved without moving elements one by one
|
650
|
+
throw_bad_alloc();
|
531
651
|
}
|
532
652
|
|
533
|
-
|
534
|
-
|
653
|
+
|
654
|
+
void steal_resources(vector_alloc_holder &)
|
655
|
+
{ //Containers with version 0 allocators can't be moved without moving elements one by one
|
535
656
|
throw_bad_alloc();
|
536
657
|
}
|
537
658
|
|
538
|
-
Allocator &alloc()
|
659
|
+
Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
|
539
660
|
{ return *this; }
|
540
661
|
|
541
|
-
const Allocator &alloc() const
|
662
|
+
const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
|
542
663
|
{ return *this; }
|
543
664
|
|
544
|
-
|
545
|
-
|
665
|
+
bool try_expand_fwd(size_type at_least)
|
666
|
+
{ return !at_least; }
|
667
|
+
|
668
|
+
pointer start() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_storage(); }
|
669
|
+
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_capacity; }
|
546
670
|
size_type m_size;
|
547
671
|
|
548
672
|
private:
|
549
673
|
|
550
674
|
template<class OtherAllocator, class OtherAllocatorVersion>
|
551
|
-
void
|
675
|
+
void priv_deep_swap(vector_alloc_holder<OtherAllocator, OtherAllocatorVersion> &x)
|
552
676
|
{
|
553
|
-
const
|
677
|
+
const size_type MaxTmpStorage = sizeof(value_type)*Allocator::internal_capacity;
|
554
678
|
value_type *const first_this = container_detail::to_raw_pointer(this->start());
|
555
679
|
value_type *const first_x = container_detail::to_raw_pointer(x.start());
|
556
680
|
|
@@ -560,37 +684,53 @@ struct vector_alloc_holder<Allocator, container_detail::integral_constant<unsign
|
|
560
684
|
else{
|
561
685
|
boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_x, x.m_size, first_this, this->m_size);
|
562
686
|
}
|
563
|
-
boost::
|
687
|
+
boost::adl_move_swap(this->m_size, x.m_size);
|
564
688
|
}
|
565
689
|
};
|
566
690
|
|
567
691
|
} //namespace container_detail {
|
568
|
-
/// @endcond
|
569
692
|
|
570
|
-
|
693
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
694
|
+
|
571
695
|
//! A vector is a sequence that supports random access to elements, constant
|
572
696
|
//! time insertion and removal of elements at the end, and linear time insertion
|
573
697
|
//! and removal of elements at the beginning or in the middle. The number of
|
574
698
|
//! elements in a vector may vary dynamically; memory management is automatic.
|
575
|
-
//!
|
576
|
-
//!
|
577
|
-
|
578
|
-
template <class T, class Allocator =
|
579
|
-
#else
|
580
|
-
template <class T, class Allocator>
|
581
|
-
#endif
|
699
|
+
//!
|
700
|
+
//! \tparam T The type of object that is stored in the vector
|
701
|
+
//! \tparam Allocator The allocator used for all internal memory management
|
702
|
+
template <class T, class Allocator BOOST_CONTAINER_DOCONLY(= new_allocator<T>) >
|
582
703
|
class vector
|
583
704
|
{
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
705
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
706
|
+
|
707
|
+
struct value_less
|
708
|
+
{
|
709
|
+
typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
|
710
|
+
bool operator()(const value_type &a, const value_type &b) const
|
711
|
+
{ return a < b; }
|
712
|
+
};
|
713
|
+
|
714
|
+
typedef typename container_detail::version<Allocator>::type alloc_version;
|
715
|
+
typedef boost::container::container_detail::vector_alloc_holder<Allocator> alloc_holder_t;
|
716
|
+
alloc_holder_t m_holder;
|
717
|
+
typedef allocator_traits<Allocator> allocator_traits_type;
|
591
718
|
template <class U, class UAllocator>
|
592
719
|
friend class vector;
|
593
|
-
|
720
|
+
|
721
|
+
typedef typename allocator_traits_type::pointer pointer_impl;
|
722
|
+
typedef container_detail::vec_iterator<pointer_impl, false> iterator_impl;
|
723
|
+
typedef container_detail::vec_iterator<pointer_impl, true > const_iterator_impl;
|
724
|
+
|
725
|
+
protected:
|
726
|
+
static bool is_propagable_from(const Allocator &from_alloc, pointer_impl p, const Allocator &to_alloc, bool const propagate_allocator)
|
727
|
+
{ return alloc_holder_t::is_propagable_from(from_alloc, p, to_alloc, propagate_allocator); }
|
728
|
+
|
729
|
+
static bool are_swap_propagable( const Allocator &l_a, pointer_impl l_p
|
730
|
+
, const Allocator &r_a, pointer_impl r_p, bool const propagate_allocator)
|
731
|
+
{ return alloc_holder_t::are_swap_propagable(l_a, l_p, r_a, r_p, propagate_allocator); }
|
732
|
+
|
733
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
594
734
|
public:
|
595
735
|
//////////////////////////////////////////////
|
596
736
|
//
|
@@ -607,27 +747,38 @@ class vector
|
|
607
747
|
typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
|
608
748
|
typedef Allocator allocator_type;
|
609
749
|
typedef Allocator stored_allocator_type;
|
610
|
-
#if defined BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
|
750
|
+
#if defined BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER
|
611
751
|
typedef BOOST_CONTAINER_IMPDEF(pointer) iterator;
|
612
752
|
typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator;
|
613
753
|
#else
|
614
|
-
typedef BOOST_CONTAINER_IMPDEF(
|
615
|
-
typedef BOOST_CONTAINER_IMPDEF(
|
754
|
+
typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
|
755
|
+
typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
|
616
756
|
#endif
|
617
|
-
typedef BOOST_CONTAINER_IMPDEF(
|
618
|
-
typedef BOOST_CONTAINER_IMPDEF(
|
757
|
+
typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
|
758
|
+
typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
|
619
759
|
|
620
|
-
|
760
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
621
761
|
private:
|
622
762
|
BOOST_COPYABLE_AND_MOVABLE(vector)
|
623
|
-
typedef container_detail::vector_value_traits<
|
763
|
+
typedef container_detail::vector_value_traits<Allocator> value_traits;
|
764
|
+
typedef constant_iterator<T, difference_type> cvalue_iterator;
|
624
765
|
|
625
|
-
|
626
|
-
typedef container_detail::integral_constant<unsigned, 1> allocator_v1;
|
627
|
-
typedef container_detail::integral_constant<unsigned, 2> allocator_v2;
|
766
|
+
protected:
|
628
767
|
|
629
|
-
|
630
|
-
|
768
|
+
void steal_resources(vector &x)
|
769
|
+
{ return this->m_holder.steal_resources(x.m_holder); }
|
770
|
+
|
771
|
+
struct initial_capacity_t{};
|
772
|
+
template<class AllocFwd>
|
773
|
+
vector(initial_capacity_t, pointer initial_memory, size_type capacity, BOOST_FWD_REF(AllocFwd) a)
|
774
|
+
: m_holder(initial_memory, capacity, ::boost::forward<AllocFwd>(a))
|
775
|
+
{}
|
776
|
+
|
777
|
+
vector(initial_capacity_t, pointer initial_memory, size_type capacity)
|
778
|
+
: m_holder(initial_memory, capacity)
|
779
|
+
{}
|
780
|
+
|
781
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
631
782
|
|
632
783
|
public:
|
633
784
|
//////////////////////////////////////////////
|
@@ -638,11 +789,10 @@ class vector
|
|
638
789
|
|
639
790
|
//! <b>Effects</b>: Constructs a vector taking the allocator as parameter.
|
640
791
|
//!
|
641
|
-
//! <b>Throws</b>:
|
792
|
+
//! <b>Throws</b>: Nothing.
|
642
793
|
//!
|
643
794
|
//! <b>Complexity</b>: Constant.
|
644
|
-
vector()
|
645
|
-
BOOST_CONTAINER_NOEXCEPT_IF(::boost::has_nothrow_default_constructor<Allocator>::value)
|
795
|
+
vector() BOOST_NOEXCEPT_OR_NOTHROW
|
646
796
|
: m_holder()
|
647
797
|
{}
|
648
798
|
|
@@ -651,35 +801,96 @@ class vector
|
|
651
801
|
//! <b>Throws</b>: Nothing
|
652
802
|
//!
|
653
803
|
//! <b>Complexity</b>: Constant.
|
654
|
-
explicit vector(const
|
804
|
+
explicit vector(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
|
655
805
|
: m_holder(a)
|
656
806
|
{}
|
657
807
|
|
658
|
-
//! <b>Effects</b>: Constructs a vector
|
659
|
-
//! and inserts n default contructed values.
|
808
|
+
//! <b>Effects</b>: Constructs a vector and inserts n value initialized values.
|
660
809
|
//!
|
661
|
-
//! <b>Throws</b>: If allocator_type's
|
662
|
-
//! throws or T's
|
810
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
811
|
+
//! throws or T's value initialization throws.
|
663
812
|
//!
|
664
813
|
//! <b>Complexity</b>: Linear to n.
|
665
814
|
explicit vector(size_type n)
|
666
|
-
: m_holder(n)
|
815
|
+
: m_holder(container_detail::uninitialized_size, n)
|
816
|
+
{
|
817
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
818
|
+
this->num_alloc += n != 0;
|
819
|
+
#endif
|
820
|
+
boost::container::uninitialized_value_init_alloc_n
|
821
|
+
(this->m_holder.alloc(), n, this->priv_raw_begin());
|
822
|
+
}
|
823
|
+
|
824
|
+
//! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
|
825
|
+
//! and inserts n default initialized values.
|
826
|
+
//!
|
827
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
828
|
+
//! throws or T's default initialization throws.
|
829
|
+
//!
|
830
|
+
//! <b>Complexity</b>: Linear to n.
|
831
|
+
//!
|
832
|
+
//! <b>Note</b>: Non-standard extension
|
833
|
+
vector(size_type n, default_init_t)
|
834
|
+
: m_holder(container_detail::uninitialized_size, n)
|
667
835
|
{
|
668
|
-
|
836
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
837
|
+
this->num_alloc += n != 0;
|
838
|
+
#endif
|
839
|
+
boost::container::uninitialized_default_init_alloc_n
|
840
|
+
(this->m_holder.alloc(), n, this->priv_raw_begin());
|
841
|
+
}
|
842
|
+
|
843
|
+
//! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
|
844
|
+
//! and inserts n value initialized values.
|
845
|
+
//!
|
846
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
847
|
+
//! throws or T's value initialization throws.
|
848
|
+
//!
|
849
|
+
//! <b>Complexity</b>: Linear to n.
|
850
|
+
explicit vector(size_type n, const allocator_type &a)
|
851
|
+
: m_holder(container_detail::uninitialized_size, a, n)
|
852
|
+
{
|
853
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
854
|
+
this->num_alloc += n != 0;
|
855
|
+
#endif
|
856
|
+
boost::container::uninitialized_value_init_alloc_n
|
857
|
+
(this->m_holder.alloc(), n, this->priv_raw_begin());
|
858
|
+
}
|
859
|
+
|
860
|
+
//! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
|
861
|
+
//! and inserts n default initialized values.
|
862
|
+
//!
|
863
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
864
|
+
//! throws or T's default initialization throws.
|
865
|
+
//!
|
866
|
+
//! <b>Complexity</b>: Linear to n.
|
867
|
+
//!
|
868
|
+
//! <b>Note</b>: Non-standard extension
|
869
|
+
vector(size_type n, default_init_t, const allocator_type &a)
|
870
|
+
: m_holder(container_detail::uninitialized_size, a, n)
|
871
|
+
{
|
872
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
873
|
+
this->num_alloc += n != 0;
|
874
|
+
#endif
|
875
|
+
boost::container::uninitialized_default_init_alloc_n
|
876
|
+
(this->m_holder.alloc(), n, this->priv_raw_begin());
|
669
877
|
}
|
670
878
|
|
671
879
|
//! <b>Effects</b>: Constructs a vector
|
672
880
|
//! and inserts n copies of value.
|
673
881
|
//!
|
674
|
-
//! <b>Throws</b>: If allocator_type's
|
882
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
675
883
|
//! throws or T's copy constructor throws.
|
676
884
|
//!
|
677
885
|
//! <b>Complexity</b>: Linear to n.
|
678
886
|
vector(size_type n, const T& value)
|
679
|
-
: m_holder(n)
|
887
|
+
: m_holder(container_detail::uninitialized_size, n)
|
680
888
|
{
|
889
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
890
|
+
this->num_alloc += n != 0;
|
891
|
+
#endif
|
681
892
|
boost::container::uninitialized_fill_alloc_n
|
682
|
-
(this->m_holder.alloc(), value, n,
|
893
|
+
(this->m_holder.alloc(), value, n, this->priv_raw_begin());
|
683
894
|
}
|
684
895
|
|
685
896
|
//! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
|
@@ -690,73 +901,98 @@ class vector
|
|
690
901
|
//!
|
691
902
|
//! <b>Complexity</b>: Linear to n.
|
692
903
|
vector(size_type n, const T& value, const allocator_type& a)
|
693
|
-
: m_holder(a, n)
|
904
|
+
: m_holder(container_detail::uninitialized_size, a, n)
|
694
905
|
{
|
906
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
907
|
+
this->num_alloc += n != 0;
|
908
|
+
#endif
|
695
909
|
boost::container::uninitialized_fill_alloc_n
|
696
|
-
(this->m_holder.alloc(), value, n,
|
910
|
+
(this->m_holder.alloc(), value, n, this->priv_raw_begin());
|
697
911
|
}
|
698
912
|
|
699
913
|
//! <b>Effects</b>: Constructs a vector
|
700
914
|
//! and inserts a copy of the range [first, last) in the vector.
|
701
915
|
//!
|
702
|
-
//! <b>Throws</b>: If allocator_type's
|
703
|
-
//! throws or T's constructor taking
|
916
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
917
|
+
//! throws or T's constructor taking a dereferenced InIt throws.
|
704
918
|
//!
|
705
919
|
//! <b>Complexity</b>: Linear to the range [first, last).
|
706
920
|
template <class InIt>
|
707
921
|
vector(InIt first, InIt last)
|
708
922
|
: m_holder()
|
709
|
-
{ this->
|
923
|
+
{ this->assign(first, last); }
|
710
924
|
|
711
925
|
//! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
|
712
926
|
//! and inserts a copy of the range [first, last) in the vector.
|
713
927
|
//!
|
714
|
-
//! <b>Throws</b>: If allocator_type's
|
715
|
-
//! throws or T's constructor taking
|
928
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
929
|
+
//! throws or T's constructor taking a dereferenced InIt throws.
|
716
930
|
//!
|
717
931
|
//! <b>Complexity</b>: Linear to the range [first, last).
|
718
932
|
template <class InIt>
|
719
933
|
vector(InIt first, InIt last, const allocator_type& a)
|
720
934
|
: m_holder(a)
|
721
|
-
{ this->
|
935
|
+
{ this->assign(first, last); }
|
722
936
|
|
723
937
|
//! <b>Effects</b>: Copy constructs a vector.
|
724
938
|
//!
|
725
939
|
//! <b>Postcondition</b>: x == *this.
|
726
940
|
//!
|
727
|
-
//! <b>Throws</b>: If allocator_type's
|
941
|
+
//! <b>Throws</b>: If allocator_type's allocation
|
728
942
|
//! throws or T's copy constructor throws.
|
729
943
|
//!
|
730
944
|
//! <b>Complexity</b>: Linear to the elements x contains.
|
731
945
|
vector(const vector &x)
|
732
|
-
: m_holder(
|
946
|
+
: m_holder( container_detail::uninitialized_size
|
947
|
+
, allocator_traits_type::select_on_container_copy_construction(x.m_holder.alloc())
|
948
|
+
, x.size())
|
733
949
|
{
|
950
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
951
|
+
this->num_alloc += x.size() != 0;
|
952
|
+
#endif
|
734
953
|
::boost::container::uninitialized_copy_alloc_n
|
735
|
-
( this->m_holder.alloc(),
|
736
|
-
, x.size(),
|
954
|
+
( this->m_holder.alloc(), x.priv_raw_begin()
|
955
|
+
, x.size(), this->priv_raw_begin());
|
737
956
|
}
|
738
957
|
|
739
|
-
//! <b>Effects</b>: Move constructor. Moves
|
958
|
+
//! <b>Effects</b>: Move constructor. Moves x's resources to *this.
|
740
959
|
//!
|
741
960
|
//! <b>Throws</b>: Nothing
|
742
961
|
//!
|
743
962
|
//! <b>Complexity</b>: Constant.
|
744
|
-
vector(BOOST_RV_REF(vector)
|
745
|
-
: m_holder(boost::move(
|
746
|
-
{}
|
963
|
+
vector(BOOST_RV_REF(vector) x) BOOST_NOEXCEPT_OR_NOTHROW
|
964
|
+
: m_holder(boost::move(x.m_holder))
|
965
|
+
{ BOOST_STATIC_ASSERT((!allocator_traits_type::is_partially_propagable::value)); }
|
966
|
+
|
967
|
+
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
968
|
+
//! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
|
969
|
+
//! and inserts a copy of the range [il.begin(), il.last()) in the vector
|
970
|
+
//!
|
971
|
+
//! <b>Throws</b>: If T's constructor taking a dereferenced initializer_list iterator throws.
|
972
|
+
//!
|
973
|
+
//! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
|
974
|
+
vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
|
975
|
+
: m_holder(a)
|
976
|
+
{
|
977
|
+
this->assign(il.begin(), il.end());
|
978
|
+
}
|
979
|
+
#endif
|
747
980
|
|
748
981
|
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
749
982
|
|
750
|
-
//! <b>Effects</b>: Move constructor. Moves
|
983
|
+
//! <b>Effects</b>: Move constructor. Moves x's resources to *this.
|
751
984
|
//!
|
752
985
|
//! <b>Throws</b>: If T's move constructor or allocation throws
|
753
986
|
//!
|
754
987
|
//! <b>Complexity</b>: Linear.
|
755
988
|
//!
|
756
|
-
//! <b>Note</b>: Non-standard extension
|
989
|
+
//! <b>Note</b>: Non-standard extension to support static_vector
|
757
990
|
template<class OtherAllocator>
|
758
|
-
vector(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END
|
759
|
-
|
991
|
+
vector(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
|
992
|
+
, typename container_detail::enable_if_c
|
993
|
+
< container_detail::is_version<OtherAllocator, 0>::value>::type * = 0
|
994
|
+
)
|
995
|
+
: m_holder(boost::move(x.m_holder))
|
760
996
|
{}
|
761
997
|
|
762
998
|
#endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
@@ -770,33 +1006,39 @@ class vector
|
|
770
1006
|
//!
|
771
1007
|
//! <b>Complexity</b>: Linear to the elements x contains.
|
772
1008
|
vector(const vector &x, const allocator_type &a)
|
773
|
-
: m_holder(a, x.size())
|
1009
|
+
: m_holder(container_detail::uninitialized_size, a, x.size())
|
774
1010
|
{
|
1011
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1012
|
+
this->num_alloc += x.size() != 0;
|
1013
|
+
#endif
|
775
1014
|
::boost::container::uninitialized_copy_alloc_n_source
|
776
|
-
( this->m_holder.alloc(),
|
777
|
-
, x.size(),
|
1015
|
+
( this->m_holder.alloc(), x.priv_raw_begin()
|
1016
|
+
, x.size(), this->priv_raw_begin());
|
778
1017
|
}
|
779
1018
|
|
780
1019
|
//! <b>Effects</b>: Move constructor using the specified allocator.
|
781
|
-
//! Moves
|
1020
|
+
//! Moves x's resources to *this if a == allocator_type().
|
782
1021
|
//! Otherwise copies values from x to *this.
|
783
1022
|
//!
|
784
1023
|
//! <b>Throws</b>: If allocation or T's copy constructor throws.
|
785
1024
|
//!
|
786
|
-
//! <b>Complexity</b>: Constant if a ==
|
787
|
-
vector(BOOST_RV_REF(vector)
|
788
|
-
: m_holder(a
|
1025
|
+
//! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
|
1026
|
+
vector(BOOST_RV_REF(vector) x, const allocator_type &a)
|
1027
|
+
: m_holder( container_detail::uninitialized_size, a
|
1028
|
+
, is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true) ? 0 : x.size()
|
1029
|
+
)
|
789
1030
|
{
|
790
|
-
if(
|
791
|
-
this->m_holder.
|
1031
|
+
if(is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true)){
|
1032
|
+
this->m_holder.steal_resources(x.m_holder);
|
792
1033
|
}
|
793
1034
|
else{
|
794
|
-
const size_type n =
|
795
|
-
|
1035
|
+
const size_type n = x.size();
|
1036
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1037
|
+
this->num_alloc += n != 0;
|
1038
|
+
#endif
|
796
1039
|
::boost::container::uninitialized_move_alloc_n_source
|
797
|
-
( this->m_holder.alloc(),
|
798
|
-
, n,
|
799
|
-
this->m_holder.m_size = n;
|
1040
|
+
( this->m_holder.alloc(), x.priv_raw_begin()
|
1041
|
+
, n, this->priv_raw_begin());
|
800
1042
|
}
|
801
1043
|
}
|
802
1044
|
|
@@ -806,12 +1048,12 @@ class vector
|
|
806
1048
|
//! <b>Throws</b>: Nothing.
|
807
1049
|
//!
|
808
1050
|
//! <b>Complexity</b>: Linear to the number of elements.
|
809
|
-
~vector()
|
1051
|
+
~vector() BOOST_NOEXCEPT_OR_NOTHROW
|
810
1052
|
{
|
811
1053
|
boost::container::destroy_alloc_n
|
812
|
-
(this->get_stored_allocator(),
|
1054
|
+
(this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
|
813
1055
|
//vector_alloc_holder deallocates the data
|
814
|
-
}
|
1056
|
+
}
|
815
1057
|
|
816
1058
|
//! <b>Effects</b>: Makes *this contain the same elements as x.
|
817
1059
|
//!
|
@@ -824,30 +1066,45 @@ class vector
|
|
824
1066
|
vector& operator=(BOOST_COPY_ASSIGN_REF(vector) x)
|
825
1067
|
{
|
826
1068
|
if (&x != this){
|
827
|
-
this->priv_copy_assign(
|
1069
|
+
this->priv_copy_assign(x);
|
828
1070
|
}
|
829
1071
|
return *this;
|
830
1072
|
}
|
831
1073
|
|
832
|
-
|
1074
|
+
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1075
|
+
//! <b>Effects</b>: Make *this container contains elements from il.
|
1076
|
+
//!
|
1077
|
+
//! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
|
1078
|
+
vector& operator=(std::initializer_list<value_type> il)
|
1079
|
+
{
|
1080
|
+
this->assign(il.begin(), il.end());
|
1081
|
+
return *this;
|
1082
|
+
}
|
1083
|
+
#endif
|
1084
|
+
|
1085
|
+
//! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
|
833
1086
|
//!
|
834
1087
|
//! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
|
835
1088
|
//! before the function.
|
836
1089
|
//!
|
837
|
-
//! <b>Throws</b>:
|
1090
|
+
//! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
|
1091
|
+
//! is false and (allocation throws or value_type's move constructor throws)
|
838
1092
|
//!
|
839
|
-
//! <b>Complexity</b>:
|
1093
|
+
//! <b>Complexity</b>: Constant if allocator_traits_type::
|
1094
|
+
//! propagate_on_container_move_assignment is true or
|
1095
|
+
//! this->get>allocator() == x.get_allocator(). Linear otherwise.
|
840
1096
|
vector& operator=(BOOST_RV_REF(vector) x)
|
841
|
-
|
842
|
-
|
1097
|
+
BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
|
1098
|
+
|| allocator_traits_type::is_always_equal::value)
|
843
1099
|
{
|
844
|
-
|
1100
|
+
BOOST_ASSERT(&x != this);
|
1101
|
+
this->priv_move_assign(boost::move(x));
|
845
1102
|
return *this;
|
846
1103
|
}
|
847
1104
|
|
848
1105
|
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
849
1106
|
|
850
|
-
//! <b>Effects</b>: Move assignment. All
|
1107
|
+
//! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
|
851
1108
|
//!
|
852
1109
|
//! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
|
853
1110
|
//! before the function.
|
@@ -855,10 +1112,39 @@ class vector
|
|
855
1112
|
//! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
|
856
1113
|
//!
|
857
1114
|
//! <b>Complexity</b>: Linear.
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
1115
|
+
//!
|
1116
|
+
//! <b>Note</b>: Non-standard extension to support static_vector
|
1117
|
+
template<class OtherAllocator>
|
1118
|
+
typename container_detail::enable_if_and
|
1119
|
+
< vector&
|
1120
|
+
, container_detail::is_version<OtherAllocator, 0>
|
1121
|
+
, container_detail::is_different<OtherAllocator, allocator_type>
|
1122
|
+
>::type
|
1123
|
+
operator=(BOOST_RV_REF_BEG vector<value_type, OtherAllocator> BOOST_RV_REF_END x)
|
1124
|
+
{
|
1125
|
+
this->priv_move_assign(boost::move(x));
|
1126
|
+
return *this;
|
1127
|
+
}
|
1128
|
+
|
1129
|
+
//! <b>Effects</b>: Copy assignment. All x's values are copied to *this.
|
1130
|
+
//!
|
1131
|
+
//! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
|
1132
|
+
//! before the function.
|
1133
|
+
//!
|
1134
|
+
//! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
|
1135
|
+
//!
|
1136
|
+
//! <b>Complexity</b>: Linear.
|
1137
|
+
//!
|
1138
|
+
//! <b>Note</b>: Non-standard extension to support static_vector
|
1139
|
+
template<class OtherAllocator>
|
1140
|
+
typename container_detail::enable_if_and
|
1141
|
+
< vector&
|
1142
|
+
, container_detail::is_version<OtherAllocator, 0>
|
1143
|
+
, container_detail::is_different<OtherAllocator, allocator_type>
|
1144
|
+
>::type
|
1145
|
+
operator=(const vector<value_type, OtherAllocator> &x)
|
1146
|
+
{
|
1147
|
+
this->priv_copy_assign(x);
|
862
1148
|
return *this;
|
863
1149
|
}
|
864
1150
|
|
@@ -872,12 +1158,14 @@ class vector
|
|
872
1158
|
//! <b>Complexity</b>: Linear to n.
|
873
1159
|
template <class InIt>
|
874
1160
|
void assign(InIt first, InIt last
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
1161
|
+
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_or
|
1162
|
+
< void
|
1163
|
+
BOOST_MOVE_I container_detail::is_convertible<InIt BOOST_MOVE_I size_type>
|
1164
|
+
BOOST_MOVE_I container_detail::and_
|
1165
|
+
< container_detail::is_different<alloc_version BOOST_MOVE_I version_0>
|
1166
|
+
BOOST_MOVE_I container_detail::is_not_input_iterator<InIt>
|
1167
|
+
>
|
1168
|
+
>::type * = 0)
|
881
1169
|
)
|
882
1170
|
{
|
883
1171
|
//Overwrite all elements we can from [first, last)
|
@@ -889,8 +1177,8 @@ class vector
|
|
889
1177
|
|
890
1178
|
if (first == last){
|
891
1179
|
//There are no more elements in the sequence, erase remaining
|
892
|
-
T* const end_pos =
|
893
|
-
size_type n = static_cast<size_type>(end_pos - container_detail::
|
1180
|
+
T* const end_pos = this->priv_raw_end();
|
1181
|
+
const size_type n = static_cast<size_type>(end_pos - container_detail::iterator_to_raw_pointer(cur));
|
894
1182
|
this->priv_destroy_last_n(n);
|
895
1183
|
}
|
896
1184
|
else{
|
@@ -899,6 +1187,82 @@ class vector
|
|
899
1187
|
}
|
900
1188
|
}
|
901
1189
|
|
1190
|
+
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1191
|
+
//! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
|
1192
|
+
//!
|
1193
|
+
//! <b>Throws</b>: If memory allocation throws or
|
1194
|
+
//! T's constructor from dereferencing iniializer_list iterator throws.
|
1195
|
+
//!
|
1196
|
+
void assign(std::initializer_list<T> il)
|
1197
|
+
{
|
1198
|
+
this->assign(il.begin(), il.end());
|
1199
|
+
}
|
1200
|
+
#endif
|
1201
|
+
|
1202
|
+
//! <b>Effects</b>: Assigns the the range [first, last) to *this.
|
1203
|
+
//!
|
1204
|
+
//! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment or
|
1205
|
+
//! T's constructor/assignment from dereferencing InpIt throws.
|
1206
|
+
//!
|
1207
|
+
//! <b>Complexity</b>: Linear to n.
|
1208
|
+
template <class FwdIt>
|
1209
|
+
void assign(FwdIt first, FwdIt last
|
1210
|
+
BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_or
|
1211
|
+
< void
|
1212
|
+
BOOST_MOVE_I container_detail::is_same<alloc_version BOOST_MOVE_I version_0>
|
1213
|
+
BOOST_MOVE_I container_detail::is_convertible<FwdIt BOOST_MOVE_I size_type>
|
1214
|
+
BOOST_MOVE_I container_detail::is_input_iterator<FwdIt>
|
1215
|
+
>::type * = 0)
|
1216
|
+
)
|
1217
|
+
{
|
1218
|
+
//For Fwd iterators the standard only requires EmplaceConstructible and assignable from *first
|
1219
|
+
//so we can't do any backwards allocation
|
1220
|
+
const size_type input_sz = static_cast<size_type>(boost::container::iterator_distance(first, last));
|
1221
|
+
const size_type old_capacity = this->capacity();
|
1222
|
+
if(input_sz > old_capacity){ //If input range is too big, we need to reallocate
|
1223
|
+
size_type real_cap = 0;
|
1224
|
+
pointer reuse(this->m_holder.start());
|
1225
|
+
pointer const ret(this->m_holder.allocation_command(allocate_new|expand_fwd, input_sz, real_cap = input_sz, reuse));
|
1226
|
+
if(!reuse){ //New allocation, just emplace new values
|
1227
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1228
|
+
++this->num_alloc;
|
1229
|
+
#endif
|
1230
|
+
pointer const old_p = this->m_holder.start();
|
1231
|
+
if(old_p){
|
1232
|
+
this->priv_destroy_all();
|
1233
|
+
this->m_holder.alloc().deallocate(old_p, old_capacity);
|
1234
|
+
}
|
1235
|
+
this->m_holder.start(ret);
|
1236
|
+
this->m_holder.capacity(real_cap);
|
1237
|
+
this->m_holder.m_size = 0;
|
1238
|
+
this->priv_uninitialized_construct_at_end(first, last);
|
1239
|
+
return;
|
1240
|
+
}
|
1241
|
+
else{
|
1242
|
+
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1243
|
+
++this->num_expand_fwd;
|
1244
|
+
#endif
|
1245
|
+
this->m_holder.capacity(real_cap);
|
1246
|
+
//Forward expansion, use assignment + back deletion/construction that comes later
|
1247
|
+
}
|
1248
|
+
}
|
1249
|
+
//Overwrite all elements we can from [first, last)
|
1250
|
+
iterator cur = this->begin();
|
1251
|
+
const iterator end_it = this->end();
|
1252
|
+
for ( ; first != last && cur != end_it; ++cur, ++first){
|
1253
|
+
*cur = *first;
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
if (first == last){
|
1257
|
+
//There are no more elements in the sequence, erase remaining
|
1258
|
+
this->priv_destroy_last_n(this->size() - input_sz);
|
1259
|
+
}
|
1260
|
+
else{
|
1261
|
+
//Uninitialized construct at end the remaining range
|
1262
|
+
this->priv_uninitialized_construct_at_end(first, last);
|
1263
|
+
}
|
1264
|
+
}
|
1265
|
+
|
902
1266
|
//! <b>Effects</b>: Assigns the n copies of val to *this.
|
903
1267
|
//!
|
904
1268
|
//! <b>Throws</b>: If memory allocation throws or
|
@@ -913,7 +1277,7 @@ class vector
|
|
913
1277
|
//! <b>Throws</b>: If allocator's copy constructor throws.
|
914
1278
|
//!
|
915
1279
|
//! <b>Complexity</b>: Constant.
|
916
|
-
allocator_type get_allocator() const
|
1280
|
+
allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
917
1281
|
{ return this->m_holder.alloc(); }
|
918
1282
|
|
919
1283
|
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
@@ -923,7 +1287,7 @@ class vector
|
|
923
1287
|
//! <b>Complexity</b>: Constant.
|
924
1288
|
//!
|
925
1289
|
//! <b>Note</b>: Non-standard extension.
|
926
|
-
stored_allocator_type &get_stored_allocator()
|
1290
|
+
stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
|
927
1291
|
{ return this->m_holder.alloc(); }
|
928
1292
|
|
929
1293
|
//! <b>Effects</b>: Returns a reference to the internal allocator.
|
@@ -933,7 +1297,7 @@ class vector
|
|
933
1297
|
//! <b>Complexity</b>: Constant.
|
934
1298
|
//!
|
935
1299
|
//! <b>Note</b>: Non-standard extension.
|
936
|
-
const stored_allocator_type &get_stored_allocator() const
|
1300
|
+
const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
|
937
1301
|
{ return this->m_holder.alloc(); }
|
938
1302
|
|
939
1303
|
//////////////////////////////////////////////
|
@@ -947,7 +1311,7 @@ class vector
|
|
947
1311
|
//! <b>Throws</b>: Nothing.
|
948
1312
|
//!
|
949
1313
|
//! <b>Complexity</b>: Constant.
|
950
|
-
iterator begin()
|
1314
|
+
iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
|
951
1315
|
{ return iterator(this->m_holder.start()); }
|
952
1316
|
|
953
1317
|
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
|
@@ -955,7 +1319,7 @@ class vector
|
|
955
1319
|
//! <b>Throws</b>: Nothing.
|
956
1320
|
//!
|
957
1321
|
//! <b>Complexity</b>: Constant.
|
958
|
-
const_iterator begin() const
|
1322
|
+
const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
|
959
1323
|
{ return const_iterator(this->m_holder.start()); }
|
960
1324
|
|
961
1325
|
//! <b>Effects</b>: Returns an iterator to the end of the vector.
|
@@ -963,7 +1327,7 @@ class vector
|
|
963
1327
|
//! <b>Throws</b>: Nothing.
|
964
1328
|
//!
|
965
1329
|
//! <b>Complexity</b>: Constant.
|
966
|
-
iterator end()
|
1330
|
+
iterator end() BOOST_NOEXCEPT_OR_NOTHROW
|
967
1331
|
{ return iterator(this->m_holder.start() + this->m_holder.m_size); }
|
968
1332
|
|
969
1333
|
//! <b>Effects</b>: Returns a const_iterator to the end of the vector.
|
@@ -971,7 +1335,7 @@ class vector
|
|
971
1335
|
//! <b>Throws</b>: Nothing.
|
972
1336
|
//!
|
973
1337
|
//! <b>Complexity</b>: Constant.
|
974
|
-
const_iterator end() const
|
1338
|
+
const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
|
975
1339
|
{ return this->cend(); }
|
976
1340
|
|
977
1341
|
//! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
|
@@ -980,7 +1344,7 @@ class vector
|
|
980
1344
|
//! <b>Throws</b>: Nothing.
|
981
1345
|
//!
|
982
1346
|
//! <b>Complexity</b>: Constant.
|
983
|
-
reverse_iterator rbegin()
|
1347
|
+
reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
|
984
1348
|
{ return reverse_iterator(this->end()); }
|
985
1349
|
|
986
1350
|
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
@@ -989,7 +1353,7 @@ class vector
|
|
989
1353
|
//! <b>Throws</b>: Nothing.
|
990
1354
|
//!
|
991
1355
|
//! <b>Complexity</b>: Constant.
|
992
|
-
const_reverse_iterator rbegin() const
|
1356
|
+
const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
993
1357
|
{ return this->crbegin(); }
|
994
1358
|
|
995
1359
|
//! <b>Effects</b>: Returns a reverse_iterator pointing to the end
|
@@ -998,7 +1362,7 @@ class vector
|
|
998
1362
|
//! <b>Throws</b>: Nothing.
|
999
1363
|
//!
|
1000
1364
|
//! <b>Complexity</b>: Constant.
|
1001
|
-
reverse_iterator rend()
|
1365
|
+
reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
|
1002
1366
|
{ return reverse_iterator(this->begin()); }
|
1003
1367
|
|
1004
1368
|
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
@@ -1007,7 +1371,7 @@ class vector
|
|
1007
1371
|
//! <b>Throws</b>: Nothing.
|
1008
1372
|
//!
|
1009
1373
|
//! <b>Complexity</b>: Constant.
|
1010
|
-
const_reverse_iterator rend() const
|
1374
|
+
const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
|
1011
1375
|
{ return this->crend(); }
|
1012
1376
|
|
1013
1377
|
//! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
|
@@ -1015,7 +1379,7 @@ class vector
|
|
1015
1379
|
//! <b>Throws</b>: Nothing.
|
1016
1380
|
//!
|
1017
1381
|
//! <b>Complexity</b>: Constant.
|
1018
|
-
const_iterator cbegin() const
|
1382
|
+
const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
1019
1383
|
{ return const_iterator(this->m_holder.start()); }
|
1020
1384
|
|
1021
1385
|
//! <b>Effects</b>: Returns a const_iterator to the end of the vector.
|
@@ -1023,7 +1387,7 @@ class vector
|
|
1023
1387
|
//! <b>Throws</b>: Nothing.
|
1024
1388
|
//!
|
1025
1389
|
//! <b>Complexity</b>: Constant.
|
1026
|
-
const_iterator cend() const
|
1390
|
+
const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
|
1027
1391
|
{ return const_iterator(this->m_holder.start() + this->m_holder.m_size); }
|
1028
1392
|
|
1029
1393
|
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
|
@@ -1032,7 +1396,7 @@ class vector
|
|
1032
1396
|
//! <b>Throws</b>: Nothing.
|
1033
1397
|
//!
|
1034
1398
|
//! <b>Complexity</b>: Constant.
|
1035
|
-
const_reverse_iterator crbegin() const
|
1399
|
+
const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
|
1036
1400
|
{ return const_reverse_iterator(this->end());}
|
1037
1401
|
|
1038
1402
|
//! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
|
@@ -1041,7 +1405,7 @@ class vector
|
|
1041
1405
|
//! <b>Throws</b>: Nothing.
|
1042
1406
|
//!
|
1043
1407
|
//! <b>Complexity</b>: Constant.
|
1044
|
-
const_reverse_iterator crend() const
|
1408
|
+
const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
|
1045
1409
|
{ return const_reverse_iterator(this->begin()); }
|
1046
1410
|
|
1047
1411
|
//////////////////////////////////////////////
|
@@ -1055,7 +1419,7 @@ class vector
|
|
1055
1419
|
//! <b>Throws</b>: Nothing.
|
1056
1420
|
//!
|
1057
1421
|
//! <b>Complexity</b>: Constant.
|
1058
|
-
bool empty() const
|
1422
|
+
bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
|
1059
1423
|
{ return !this->m_holder.m_size; }
|
1060
1424
|
|
1061
1425
|
//! <b>Effects</b>: Returns the number of the elements contained in the vector.
|
@@ -1063,7 +1427,7 @@ class vector
|
|
1063
1427
|
//! <b>Throws</b>: Nothing.
|
1064
1428
|
//!
|
1065
1429
|
//! <b>Complexity</b>: Constant.
|
1066
|
-
size_type size() const
|
1430
|
+
size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
|
1067
1431
|
{ return this->m_holder.m_size; }
|
1068
1432
|
|
1069
1433
|
//! <b>Effects</b>: Returns the largest possible size of the vector.
|
@@ -1071,48 +1435,37 @@ class vector
|
|
1071
1435
|
//! <b>Throws</b>: Nothing.
|
1072
1436
|
//!
|
1073
1437
|
//! <b>Complexity</b>: Constant.
|
1074
|
-
size_type max_size() const
|
1438
|
+
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
|
1075
1439
|
{ return allocator_traits_type::max_size(this->m_holder.alloc()); }
|
1076
1440
|
|
1077
1441
|
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
1078
|
-
//! the size becomes n. New elements are
|
1442
|
+
//! the size becomes n. New elements are value initialized.
|
1079
1443
|
//!
|
1080
|
-
//! <b>Throws</b>: If memory allocation throws, or T's copy
|
1444
|
+
//! <b>Throws</b>: If memory allocation throws, or T's copy/move or value initialization throws.
|
1081
1445
|
//!
|
1082
1446
|
//! <b>Complexity</b>: Linear to the difference between size() and new_size.
|
1083
1447
|
void resize(size_type new_size)
|
1084
|
-
{
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
}
|
1448
|
+
{ this->priv_resize(new_size, value_init); }
|
1449
|
+
|
1450
|
+
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
1451
|
+
//! the size becomes n. New elements are default initialized.
|
1452
|
+
//!
|
1453
|
+
//! <b>Throws</b>: If memory allocation throws, or T's copy/move or default initialization throws.
|
1454
|
+
//!
|
1455
|
+
//! <b>Complexity</b>: Linear to the difference between size() and new_size.
|
1456
|
+
//!
|
1457
|
+
//! <b>Note</b>: Non-standard extension
|
1458
|
+
void resize(size_type new_size, default_init_t)
|
1459
|
+
{ this->priv_resize(new_size, default_init); }
|
1096
1460
|
|
1097
1461
|
//! <b>Effects</b>: Inserts or erases elements at the end such that
|
1098
1462
|
//! the size becomes n. New elements are copy constructed from x.
|
1099
1463
|
//!
|
1100
|
-
//! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
|
1464
|
+
//! <b>Throws</b>: If memory allocation throws, or T's copy/move constructor throws.
|
1101
1465
|
//!
|
1102
1466
|
//! <b>Complexity</b>: Linear to the difference between size() and new_size.
|
1103
1467
|
void resize(size_type new_size, const T& x)
|
1104
|
-
{
|
1105
|
-
const size_type sz = this->size();
|
1106
|
-
if (new_size < sz){
|
1107
|
-
//Destroy last elements
|
1108
|
-
this->priv_destroy_last_n(sz - new_size);
|
1109
|
-
}
|
1110
|
-
else{
|
1111
|
-
const size_type n = new_size - this->size();
|
1112
|
-
container_detail::insert_n_copies_proxy<Allocator, T*> proxy(this->m_holder.alloc(), x);
|
1113
|
-
this->priv_forward_range_insert_at_end(n, proxy, alloc_version());
|
1114
|
-
}
|
1115
|
-
}
|
1468
|
+
{ this->priv_resize(new_size, x); }
|
1116
1469
|
|
1117
1470
|
//! <b>Effects</b>: Number of elements for which memory has been allocated.
|
1118
1471
|
//! capacity() is always greater than or equal to size().
|
@@ -1120,7 +1473,7 @@ class vector
|
|
1120
1473
|
//! <b>Throws</b>: Nothing.
|
1121
1474
|
//!
|
1122
1475
|
//! <b>Complexity</b>: Constant.
|
1123
|
-
size_type capacity() const
|
1476
|
+
size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
|
1124
1477
|
{ return this->m_holder.capacity(); }
|
1125
1478
|
|
1126
1479
|
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
|
@@ -1132,7 +1485,7 @@ class vector
|
|
1132
1485
|
void reserve(size_type new_cap)
|
1133
1486
|
{
|
1134
1487
|
if (this->capacity() < new_cap){
|
1135
|
-
this->
|
1488
|
+
this->priv_reserve_no_capacity(new_cap, alloc_version());
|
1136
1489
|
}
|
1137
1490
|
}
|
1138
1491
|
|
@@ -1159,8 +1512,11 @@ class vector
|
|
1159
1512
|
//! <b>Throws</b>: Nothing.
|
1160
1513
|
//!
|
1161
1514
|
//! <b>Complexity</b>: Constant.
|
1162
|
-
reference front()
|
1163
|
-
{
|
1515
|
+
reference front() BOOST_NOEXCEPT_OR_NOTHROW
|
1516
|
+
{
|
1517
|
+
BOOST_ASSERT(!this->empty());
|
1518
|
+
return *this->m_holder.start();
|
1519
|
+
}
|
1164
1520
|
|
1165
1521
|
//! <b>Requires</b>: !empty()
|
1166
1522
|
//!
|
@@ -1170,8 +1526,11 @@ class vector
|
|
1170
1526
|
//! <b>Throws</b>: Nothing.
|
1171
1527
|
//!
|
1172
1528
|
//! <b>Complexity</b>: Constant.
|
1173
|
-
const_reference front() const
|
1174
|
-
{
|
1529
|
+
const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
|
1530
|
+
{
|
1531
|
+
BOOST_ASSERT(!this->empty());
|
1532
|
+
return *this->m_holder.start();
|
1533
|
+
}
|
1175
1534
|
|
1176
1535
|
//! <b>Requires</b>: !empty()
|
1177
1536
|
//!
|
@@ -1181,8 +1540,11 @@ class vector
|
|
1181
1540
|
//! <b>Throws</b>: Nothing.
|
1182
1541
|
//!
|
1183
1542
|
//! <b>Complexity</b>: Constant.
|
1184
|
-
reference back()
|
1185
|
-
{
|
1543
|
+
reference back() BOOST_NOEXCEPT_OR_NOTHROW
|
1544
|
+
{
|
1545
|
+
BOOST_ASSERT(!this->empty());
|
1546
|
+
return this->m_holder.start()[this->m_holder.m_size - 1];
|
1547
|
+
}
|
1186
1548
|
|
1187
1549
|
//! <b>Requires</b>: !empty()
|
1188
1550
|
//!
|
@@ -1192,8 +1554,11 @@ class vector
|
|
1192
1554
|
//! <b>Throws</b>: Nothing.
|
1193
1555
|
//!
|
1194
1556
|
//! <b>Complexity</b>: Constant.
|
1195
|
-
const_reference back() const
|
1196
|
-
{
|
1557
|
+
const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
|
1558
|
+
{
|
1559
|
+
BOOST_ASSERT(!this->empty());
|
1560
|
+
return this->m_holder.start()[this->m_holder.m_size - 1];
|
1561
|
+
}
|
1197
1562
|
|
1198
1563
|
//! <b>Requires</b>: size() > n.
|
1199
1564
|
//!
|
@@ -1203,8 +1568,11 @@ class vector
|
|
1203
1568
|
//! <b>Throws</b>: Nothing.
|
1204
1569
|
//!
|
1205
1570
|
//! <b>Complexity</b>: Constant.
|
1206
|
-
reference operator[](size_type n)
|
1207
|
-
{
|
1571
|
+
reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
1572
|
+
{
|
1573
|
+
BOOST_ASSERT(this->m_holder.m_size > n);
|
1574
|
+
return this->m_holder.start()[n];
|
1575
|
+
}
|
1208
1576
|
|
1209
1577
|
//! <b>Requires</b>: size() > n.
|
1210
1578
|
//!
|
@@ -1214,8 +1582,78 @@ class vector
|
|
1214
1582
|
//! <b>Throws</b>: Nothing.
|
1215
1583
|
//!
|
1216
1584
|
//! <b>Complexity</b>: Constant.
|
1217
|
-
const_reference operator[](size_type n) const
|
1218
|
-
{
|
1585
|
+
const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
1586
|
+
{
|
1587
|
+
BOOST_ASSERT(this->m_holder.m_size > n);
|
1588
|
+
return this->m_holder.start()[n];
|
1589
|
+
}
|
1590
|
+
|
1591
|
+
//! <b>Requires</b>: size() >= n.
|
1592
|
+
//!
|
1593
|
+
//! <b>Effects</b>: Returns an iterator to the nth element
|
1594
|
+
//! from the beginning of the container. Returns end()
|
1595
|
+
//! if n == size().
|
1596
|
+
//!
|
1597
|
+
//! <b>Throws</b>: Nothing.
|
1598
|
+
//!
|
1599
|
+
//! <b>Complexity</b>: Constant.
|
1600
|
+
//!
|
1601
|
+
//! <b>Note</b>: Non-standard extension
|
1602
|
+
iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
1603
|
+
{
|
1604
|
+
BOOST_ASSERT(this->m_holder.m_size >= n);
|
1605
|
+
return iterator(this->m_holder.start()+n);
|
1606
|
+
}
|
1607
|
+
|
1608
|
+
//! <b>Requires</b>: size() >= n.
|
1609
|
+
//!
|
1610
|
+
//! <b>Effects</b>: Returns a const_iterator to the nth element
|
1611
|
+
//! from the beginning of the container. Returns end()
|
1612
|
+
//! if n == size().
|
1613
|
+
//!
|
1614
|
+
//! <b>Throws</b>: Nothing.
|
1615
|
+
//!
|
1616
|
+
//! <b>Complexity</b>: Constant.
|
1617
|
+
//!
|
1618
|
+
//! <b>Note</b>: Non-standard extension
|
1619
|
+
const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
|
1620
|
+
{
|
1621
|
+
BOOST_ASSERT(this->m_holder.m_size >= n);
|
1622
|
+
return const_iterator(this->m_holder.start()+n);
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
//! <b>Requires</b>: size() >= n.
|
1626
|
+
//!
|
1627
|
+
//! <b>Effects</b>: Returns an iterator to the nth element
|
1628
|
+
//! from the beginning of the container. Returns end()
|
1629
|
+
//! if n == size().
|
1630
|
+
//!
|
1631
|
+
//! <b>Throws</b>: Nothing.
|
1632
|
+
//!
|
1633
|
+
//! <b>Complexity</b>: Constant.
|
1634
|
+
//!
|
1635
|
+
//! <b>Note</b>: Non-standard extension
|
1636
|
+
size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
|
1637
|
+
{
|
1638
|
+
//Range check assert done in priv_index_of
|
1639
|
+
return this->priv_index_of(vector_iterator_get_ptr(p));
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
//! <b>Requires</b>: begin() <= p <= end().
|
1643
|
+
//!
|
1644
|
+
//! <b>Effects</b>: Returns the index of the element pointed by p
|
1645
|
+
//! and size() if p == end().
|
1646
|
+
//!
|
1647
|
+
//! <b>Throws</b>: Nothing.
|
1648
|
+
//!
|
1649
|
+
//! <b>Complexity</b>: Constant.
|
1650
|
+
//!
|
1651
|
+
//! <b>Note</b>: Non-standard extension
|
1652
|
+
size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
|
1653
|
+
{
|
1654
|
+
//Range check assert done in priv_index_of
|
1655
|
+
return this->priv_index_of(vector_iterator_get_ptr(p));
|
1656
|
+
}
|
1219
1657
|
|
1220
1658
|
//! <b>Requires</b>: size() > n.
|
1221
1659
|
//!
|
@@ -1226,7 +1664,10 @@ class vector
|
|
1226
1664
|
//!
|
1227
1665
|
//! <b>Complexity</b>: Constant.
|
1228
1666
|
reference at(size_type n)
|
1229
|
-
{
|
1667
|
+
{
|
1668
|
+
this->priv_throw_if_out_of_range(n);
|
1669
|
+
return this->m_holder.start()[n];
|
1670
|
+
}
|
1230
1671
|
|
1231
1672
|
//! <b>Requires</b>: size() > n.
|
1232
1673
|
//!
|
@@ -1237,7 +1678,10 @@ class vector
|
|
1237
1678
|
//!
|
1238
1679
|
//! <b>Complexity</b>: Constant.
|
1239
1680
|
const_reference at(size_type n) const
|
1240
|
-
{
|
1681
|
+
{
|
1682
|
+
this->priv_throw_if_out_of_range(n);
|
1683
|
+
return this->m_holder.start()[n];
|
1684
|
+
}
|
1241
1685
|
|
1242
1686
|
//////////////////////////////////////////////
|
1243
1687
|
//
|
@@ -1245,23 +1689,23 @@ class vector
|
|
1245
1689
|
//
|
1246
1690
|
//////////////////////////////////////////////
|
1247
1691
|
|
1248
|
-
//! <b>Returns</b>:
|
1692
|
+
//! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
|
1249
1693
|
//! For a non-empty vector, data() == &front().
|
1250
1694
|
//!
|
1251
1695
|
//! <b>Throws</b>: Nothing.
|
1252
1696
|
//!
|
1253
1697
|
//! <b>Complexity</b>: Constant.
|
1254
|
-
T* data()
|
1255
|
-
{ return
|
1698
|
+
T* data() BOOST_NOEXCEPT_OR_NOTHROW
|
1699
|
+
{ return this->priv_raw_begin(); }
|
1256
1700
|
|
1257
|
-
//! <b>Returns</b>:
|
1701
|
+
//! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
|
1258
1702
|
//! For a non-empty vector, data() == &front().
|
1259
1703
|
//!
|
1260
1704
|
//! <b>Throws</b>: Nothing.
|
1261
1705
|
//!
|
1262
1706
|
//! <b>Complexity</b>: Constant.
|
1263
|
-
const T * data() const
|
1264
|
-
{ return
|
1707
|
+
const T * data() const BOOST_NOEXCEPT_OR_NOTHROW
|
1708
|
+
{ return this->priv_raw_begin(); }
|
1265
1709
|
|
1266
1710
|
//////////////////////////////////////////////
|
1267
1711
|
//
|
@@ -1269,86 +1713,111 @@ class vector
|
|
1269
1713
|
//
|
1270
1714
|
//////////////////////////////////////////////
|
1271
1715
|
|
1272
|
-
#if defined(
|
1716
|
+
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1273
1717
|
//! <b>Effects</b>: Inserts an object of type T constructed with
|
1274
1718
|
//! std::forward<Args>(args)... in the end of the vector.
|
1275
1719
|
//!
|
1276
1720
|
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
|
1277
|
-
//! T's move constructor throws.
|
1721
|
+
//! T's copy/move constructor throws.
|
1278
1722
|
//!
|
1279
1723
|
//! <b>Complexity</b>: Amortized constant time.
|
1280
1724
|
template<class ...Args>
|
1281
|
-
void emplace_back(Args
|
1725
|
+
void emplace_back(BOOST_FWD_REF(Args)...args)
|
1282
1726
|
{
|
1283
|
-
|
1284
|
-
if (this->m_holder.m_size < this->m_holder.capacity()){
|
1727
|
+
if (BOOST_LIKELY(this->room_enough())){
|
1285
1728
|
//There is more memory, just construct a new object at the end
|
1286
|
-
allocator_traits_type::construct(this->m_holder.alloc(),
|
1729
|
+
allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<Args>(args)...);
|
1287
1730
|
++this->m_holder.m_size;
|
1288
1731
|
}
|
1289
1732
|
else{
|
1290
1733
|
typedef container_detail::insert_emplace_proxy<Allocator, T*, Args...> type;
|
1291
1734
|
this->priv_forward_range_insert_no_capacity
|
1292
|
-
(
|
1735
|
+
(this->back_ptr(), 1, type(::boost::forward<Args>(args)...), alloc_version());
|
1293
1736
|
}
|
1294
1737
|
}
|
1295
1738
|
|
1739
|
+
//! <b>Effects</b>: Inserts an object of type T constructed with
|
1740
|
+
//! std::forward<Args>(args)... in the end of the vector.
|
1741
|
+
//!
|
1742
|
+
//! <b>Throws</b>: If the in-place constructor throws.
|
1743
|
+
//!
|
1744
|
+
//! <b>Complexity</b>: Constant time.
|
1745
|
+
//!
|
1746
|
+
//! <b>Note</b>: Non-standard extension.
|
1747
|
+
template<class ...Args>
|
1748
|
+
bool stable_emplace_back(BOOST_FWD_REF(Args)...args)
|
1749
|
+
{
|
1750
|
+
const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));
|
1751
|
+
if (BOOST_LIKELY(is_room_enough)){
|
1752
|
+
//There is more memory, just construct a new object at the end
|
1753
|
+
allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<Args>(args)...);
|
1754
|
+
++this->m_holder.m_size;
|
1755
|
+
}
|
1756
|
+
return is_room_enough;
|
1757
|
+
}
|
1758
|
+
|
1296
1759
|
//! <b>Requires</b>: position must be a valid iterator of *this.
|
1297
1760
|
//!
|
1298
1761
|
//! <b>Effects</b>: Inserts an object of type T constructed with
|
1299
1762
|
//! std::forward<Args>(args)... before position
|
1300
1763
|
//!
|
1301
1764
|
//! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
|
1302
|
-
//! T's move constructor/assignment throws.
|
1765
|
+
//! T's copy/move constructor/assignment throws.
|
1303
1766
|
//!
|
1304
1767
|
//! <b>Complexity</b>: If position is end(), amortized constant time
|
1305
1768
|
//! Linear time otherwise.
|
1306
1769
|
template<class ...Args>
|
1307
|
-
iterator emplace(const_iterator position, Args
|
1770
|
+
iterator emplace(const_iterator position, BOOST_FWD_REF(Args) ...args)
|
1308
1771
|
{
|
1772
|
+
BOOST_ASSERT(this->priv_in_range_or_end(position));
|
1309
1773
|
//Just call more general insert(pos, size, value) and return iterator
|
1310
1774
|
typedef container_detail::insert_emplace_proxy<Allocator, T*, Args...> type;
|
1311
|
-
return this->priv_forward_range_insert( vector_iterator_get_ptr(position), 1
|
1312
|
-
, ::boost::forward<Args>(args)...)
|
1313
|
-
}
|
1314
|
-
|
1315
|
-
#else
|
1775
|
+
return this->priv_forward_range_insert( vector_iterator_get_ptr(position), 1
|
1776
|
+
, type(::boost::forward<Args>(args)...));
|
1777
|
+
}
|
1778
|
+
|
1779
|
+
#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
1780
|
+
|
1781
|
+
#define BOOST_CONTAINER_VECTOR_EMPLACE_CODE(N) \
|
1782
|
+
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
1783
|
+
void emplace_back(BOOST_MOVE_UREF##N)\
|
1784
|
+
{\
|
1785
|
+
if (BOOST_LIKELY(this->room_enough())){\
|
1786
|
+
allocator_traits_type::construct (this->m_holder.alloc()\
|
1787
|
+
, this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
1788
|
+
++this->m_holder.m_size;\
|
1789
|
+
}\
|
1790
|
+
else{\
|
1791
|
+
typedef container_detail::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
|
1792
|
+
this->priv_forward_range_insert_no_capacity\
|
1793
|
+
( this->back_ptr(), 1, type(BOOST_MOVE_FWD##N), alloc_version());\
|
1794
|
+
}\
|
1795
|
+
}\
|
1796
|
+
\
|
1797
|
+
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
1798
|
+
bool stable_emplace_back(BOOST_MOVE_UREF##N)\
|
1799
|
+
{\
|
1800
|
+
const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));\
|
1801
|
+
if (BOOST_LIKELY(is_room_enough)){\
|
1802
|
+
allocator_traits_type::construct (this->m_holder.alloc()\
|
1803
|
+
, this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
|
1804
|
+
++this->m_holder.m_size;\
|
1805
|
+
}\
|
1806
|
+
return is_room_enough;\
|
1807
|
+
}\
|
1808
|
+
\
|
1809
|
+
BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
|
1810
|
+
iterator emplace(const_iterator pos BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
|
1811
|
+
{\
|
1812
|
+
BOOST_ASSERT(this->priv_in_range_or_end(pos));\
|
1813
|
+
typedef container_detail::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
|
1814
|
+
return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), 1, type(BOOST_MOVE_FWD##N));\
|
1815
|
+
}\
|
1816
|
+
//
|
1817
|
+
BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_VECTOR_EMPLACE_CODE)
|
1818
|
+
#undef BOOST_CONTAINER_VECTOR_EMPLACE_CODE
|
1316
1819
|
|
1317
|
-
#
|
1318
|
-
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
1319
|
-
void emplace_back(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
1320
|
-
{ \
|
1321
|
-
T* back_pos = container_detail::to_raw_pointer \
|
1322
|
-
(this->m_holder.start()) + this->m_holder.m_size; \
|
1323
|
-
if (this->m_holder.m_size < this->m_holder.capacity()){ \
|
1324
|
-
allocator_traits_type::construct (this->m_holder.alloc() \
|
1325
|
-
, back_pos BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) ); \
|
1326
|
-
++this->m_holder.m_size; \
|
1327
|
-
} \
|
1328
|
-
else{ \
|
1329
|
-
container_detail::BOOST_PP_CAT(insert_emplace_proxy_arg, n) \
|
1330
|
-
<Allocator, T* BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> proxy \
|
1331
|
-
(this->m_holder.alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); \
|
1332
|
-
this->priv_forward_range_insert_no_capacity \
|
1333
|
-
(vector_iterator_get_ptr(this->cend()), 1, proxy, alloc_version()); \
|
1334
|
-
} \
|
1335
|
-
} \
|
1336
|
-
\
|
1337
|
-
BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
|
1338
|
-
iterator emplace(const_iterator pos \
|
1339
|
-
BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _)) \
|
1340
|
-
{ \
|
1341
|
-
container_detail::BOOST_PP_CAT(insert_emplace_proxy_arg, n) \
|
1342
|
-
<Allocator, T* BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> proxy \
|
1343
|
-
(this->m_holder.alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); \
|
1344
|
-
return this->priv_forward_range_insert \
|
1345
|
-
(container_detail::to_raw_pointer(vector_iterator_get_ptr(pos)), 1, proxy, alloc_version()); \
|
1346
|
-
} \
|
1347
|
-
//!
|
1348
|
-
#define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
|
1349
|
-
#include BOOST_PP_LOCAL_ITERATE()
|
1350
|
-
|
1351
|
-
#endif //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
|
1820
|
+
#endif
|
1352
1821
|
|
1353
1822
|
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1354
1823
|
//! <b>Effects</b>: Inserts a copy of x at the end of the vector.
|
@@ -1360,17 +1829,17 @@ class vector
|
|
1360
1829
|
void push_back(const T &x);
|
1361
1830
|
|
1362
1831
|
//! <b>Effects</b>: Constructs a new element in the end of the vector
|
1363
|
-
//! and moves the resources of
|
1832
|
+
//! and moves the resources of x to this new element.
|
1364
1833
|
//!
|
1365
1834
|
//! <b>Throws</b>: If memory allocation throws or
|
1366
|
-
//! T's move constructor throws.
|
1835
|
+
//! T's copy/move constructor throws.
|
1367
1836
|
//!
|
1368
1837
|
//! <b>Complexity</b>: Amortized constant time.
|
1369
1838
|
void push_back(T &&x);
|
1370
1839
|
#else
|
1371
1840
|
BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
|
1372
1841
|
#endif
|
1373
|
-
|
1842
|
+
|
1374
1843
|
#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1375
1844
|
//! <b>Requires</b>: position must be a valid iterator of *this.
|
1376
1845
|
//!
|
@@ -1384,7 +1853,7 @@ class vector
|
|
1384
1853
|
|
1385
1854
|
//! <b>Requires</b>: position must be a valid iterator of *this.
|
1386
1855
|
//!
|
1387
|
-
//! <b>Effects</b>: Insert a new element before position with
|
1856
|
+
//! <b>Effects</b>: Insert a new element before position with x's resources.
|
1388
1857
|
//!
|
1389
1858
|
//! <b>Throws</b>: If memory allocation throws.
|
1390
1859
|
//!
|
@@ -1392,7 +1861,7 @@ class vector
|
|
1392
1861
|
//! Linear time otherwise.
|
1393
1862
|
iterator insert(const_iterator position, T &&x);
|
1394
1863
|
#else
|
1395
|
-
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator)
|
1864
|
+
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
|
1396
1865
|
#endif
|
1397
1866
|
|
1398
1867
|
//! <b>Requires</b>: p must be a valid iterator of *this.
|
@@ -1401,13 +1870,14 @@ class vector
|
|
1401
1870
|
//!
|
1402
1871
|
//! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
|
1403
1872
|
//!
|
1404
|
-
//! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
|
1873
|
+
//! <b>Throws</b>: If memory allocation throws or T's copy/move constructor throws.
|
1405
1874
|
//!
|
1406
1875
|
//! <b>Complexity</b>: Linear to n.
|
1407
1876
|
iterator insert(const_iterator p, size_type n, const T& x)
|
1408
1877
|
{
|
1409
|
-
|
1410
|
-
|
1878
|
+
BOOST_ASSERT(this->priv_in_range_or_end(p));
|
1879
|
+
container_detail::insert_n_copies_proxy<Allocator, T*> proxy(x);
|
1880
|
+
return this->priv_forward_range_insert(vector_iterator_get_ptr(p), n, proxy);
|
1411
1881
|
}
|
1412
1882
|
|
1413
1883
|
//! <b>Requires</b>: p must be a valid iterator of *this.
|
@@ -1419,17 +1889,19 @@ class vector
|
|
1419
1889
|
//! <b>Throws</b>: If memory allocation throws, T's constructor from a
|
1420
1890
|
//! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
|
1421
1891
|
//!
|
1422
|
-
//! <b>Complexity</b>: Linear to
|
1892
|
+
//! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
|
1423
1893
|
template <class InIt>
|
1424
1894
|
iterator insert(const_iterator pos, InIt first, InIt last
|
1425
1895
|
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1426
|
-
, typename container_detail::
|
1427
|
-
<
|
1428
|
-
|
1896
|
+
, typename container_detail::disable_if_or
|
1897
|
+
< void
|
1898
|
+
, container_detail::is_convertible<InIt, size_type>
|
1899
|
+
, container_detail::is_not_input_iterator<InIt>
|
1429
1900
|
>::type * = 0
|
1430
1901
|
#endif
|
1431
1902
|
)
|
1432
1903
|
{
|
1904
|
+
BOOST_ASSERT(this->priv_in_range_or_end(pos));
|
1433
1905
|
const size_type n_pos = pos - this->cbegin();
|
1434
1906
|
iterator it(vector_iterator_get_ptr(pos));
|
1435
1907
|
for(;first != last; ++first){
|
@@ -1442,27 +1914,72 @@ class vector
|
|
1442
1914
|
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1443
1915
|
template <class FwdIt>
|
1444
1916
|
iterator insert(const_iterator pos, FwdIt first, FwdIt last
|
1445
|
-
, typename container_detail::
|
1446
|
-
<
|
1447
|
-
|
1917
|
+
, typename container_detail::disable_if_or
|
1918
|
+
< void
|
1919
|
+
, container_detail::is_convertible<FwdIt, size_type>
|
1920
|
+
, container_detail::is_input_iterator<FwdIt>
|
1448
1921
|
>::type * = 0
|
1449
1922
|
)
|
1450
1923
|
{
|
1451
|
-
|
1452
|
-
|
1924
|
+
BOOST_ASSERT(this->priv_in_range_or_end(pos));
|
1925
|
+
container_detail::insert_range_proxy<Allocator, FwdIt, T*> proxy(first);
|
1926
|
+
return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), boost::container::iterator_distance(first, last), proxy);
|
1927
|
+
}
|
1928
|
+
#endif
|
1929
|
+
|
1930
|
+
//! <b>Requires</b>: p must be a valid iterator of *this. num, must
|
1931
|
+
//! be equal to boost::container::iterator_distance(first, last)
|
1932
|
+
//!
|
1933
|
+
//! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
|
1934
|
+
//!
|
1935
|
+
//! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
|
1936
|
+
//!
|
1937
|
+
//! <b>Throws</b>: If memory allocation throws, T's constructor from a
|
1938
|
+
//! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
|
1939
|
+
//!
|
1940
|
+
//! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
|
1941
|
+
//!
|
1942
|
+
//! <b>Note</b>: This function avoids a linear operation to calculate boost::container::iterator_distance[first, last)
|
1943
|
+
//! for forward and bidirectional iterators, and a one by one insertion for input iterators. This is a
|
1944
|
+
//! a non-standard extension.
|
1945
|
+
#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
|
1946
|
+
template <class InIt>
|
1947
|
+
iterator insert(const_iterator pos, size_type num, InIt first, InIt last)
|
1948
|
+
{
|
1949
|
+
BOOST_ASSERT(this->priv_in_range_or_end(pos));
|
1950
|
+
BOOST_ASSERT(container_detail::is_input_iterator<InIt>::value ||
|
1951
|
+
num == static_cast<size_type>(boost::container::iterator_distance(first, last)));
|
1952
|
+
(void)last;
|
1953
|
+
container_detail::insert_range_proxy<Allocator, InIt, T*> proxy(first);
|
1954
|
+
return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), num, proxy);
|
1955
|
+
}
|
1956
|
+
#endif
|
1957
|
+
|
1958
|
+
#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
|
1959
|
+
//! <b>Requires</b>: position must be a valid iterator of *this.
|
1960
|
+
//!
|
1961
|
+
//! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before position.
|
1962
|
+
//!
|
1963
|
+
//! <b>Returns</b>: an iterator to the first inserted element or position if first == last.
|
1964
|
+
//!
|
1965
|
+
//! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
|
1966
|
+
iterator insert(const_iterator position, std::initializer_list<value_type> il)
|
1967
|
+
{
|
1968
|
+
//Assertion done in insert()
|
1969
|
+
return this->insert(position, il.begin(), il.end());
|
1453
1970
|
}
|
1454
1971
|
#endif
|
1455
1972
|
|
1456
|
-
//! <b>Effects</b>: Removes the last element from the
|
1973
|
+
//! <b>Effects</b>: Removes the last element from the container.
|
1457
1974
|
//!
|
1458
1975
|
//! <b>Throws</b>: Nothing.
|
1459
1976
|
//!
|
1460
1977
|
//! <b>Complexity</b>: Constant time.
|
1461
|
-
void pop_back()
|
1978
|
+
void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
|
1462
1979
|
{
|
1980
|
+
BOOST_ASSERT(!this->empty());
|
1463
1981
|
//Destroy last element
|
1464
|
-
|
1465
|
-
this->priv_destroy(container_detail::to_raw_pointer(this->m_holder.start()) + this->m_holder.m_size);
|
1982
|
+
this->priv_destroy_last();
|
1466
1983
|
}
|
1467
1984
|
|
1468
1985
|
//! <b>Effects</b>: Erases the element at position pos.
|
@@ -1473,12 +1990,14 @@ class vector
|
|
1473
1990
|
//! last element. Constant if pos is the last element.
|
1474
1991
|
iterator erase(const_iterator position)
|
1475
1992
|
{
|
1476
|
-
|
1477
|
-
|
1993
|
+
BOOST_ASSERT(this->priv_in_range(position));
|
1994
|
+
const pointer p = vector_iterator_get_ptr(position);
|
1995
|
+
T *const pos_ptr = container_detail::to_raw_pointer(p);
|
1996
|
+
T *const beg_ptr = this->priv_raw_begin();
|
1997
|
+
T *const new_end_ptr = ::boost::container::move(pos_ptr + 1, beg_ptr + this->m_holder.m_size, pos_ptr);
|
1478
1998
|
//Move elements forward and destroy last
|
1479
|
-
this->
|
1480
|
-
|
1481
|
-
return iterator(vector_iterator_get_ptr(position));
|
1999
|
+
this->priv_destroy_last(pos_ptr == new_end_ptr);
|
2000
|
+
return iterator(p);
|
1482
2001
|
}
|
1483
2002
|
|
1484
2003
|
//! <b>Effects</b>: Erases the elements pointed by [first, last).
|
@@ -1489,16 +2008,14 @@ class vector
|
|
1489
2008
|
//! plus linear to the elements between pos and the last element.
|
1490
2009
|
iterator erase(const_iterator first, const_iterator last)
|
1491
2010
|
{
|
2011
|
+
BOOST_ASSERT(first == last ||
|
2012
|
+
(first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
|
1492
2013
|
if (first != last){
|
1493
|
-
T* const
|
1494
|
-
T* const
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
));
|
1499
|
-
const size_type destroyed = (end_pos - ptr);
|
1500
|
-
boost::container::destroy_alloc_n(this->get_stored_allocator(), ptr, destroyed);
|
1501
|
-
this->m_holder.m_size -= destroyed;
|
2014
|
+
T* const old_end_ptr = this->priv_raw_end();
|
2015
|
+
T* const first_ptr = container_detail::to_raw_pointer(vector_iterator_get_ptr(first));
|
2016
|
+
T* const last_ptr = container_detail::to_raw_pointer(vector_iterator_get_ptr(last));
|
2017
|
+
T* const ptr = container_detail::to_raw_pointer(boost::container::move(last_ptr, old_end_ptr, first_ptr));
|
2018
|
+
this->priv_destroy_last_n(old_end_ptr - ptr);
|
1502
2019
|
}
|
1503
2020
|
return iterator(vector_iterator_get_ptr(first));
|
1504
2021
|
}
|
@@ -1508,146 +2025,444 @@ class vector
|
|
1508
2025
|
//! <b>Throws</b>: Nothing.
|
1509
2026
|
//!
|
1510
2027
|
//! <b>Complexity</b>: Constant.
|
1511
|
-
void swap(vector& x)
|
2028
|
+
void swap(vector& x)
|
2029
|
+
BOOST_NOEXCEPT_IF( ((allocator_traits_type::propagate_on_container_swap::value
|
2030
|
+
|| allocator_traits_type::is_always_equal::value) &&
|
2031
|
+
!container_detail::is_version<Allocator, 0>::value))
|
1512
2032
|
{
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
2033
|
+
this->priv_swap(x, container_detail::bool_<container_detail::is_version<Allocator, 0>::value>());
|
2034
|
+
}
|
2035
|
+
|
2036
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
2037
|
+
|
2038
|
+
//! <b>Effects</b>: Swaps the contents of *this and x.
|
2039
|
+
//!
|
2040
|
+
//! <b>Throws</b>: Nothing.
|
2041
|
+
//!
|
2042
|
+
//! <b>Complexity</b>: Linear
|
2043
|
+
//!
|
2044
|
+
//! <b>Note</b>: Non-standard extension to support static_vector
|
2045
|
+
template<class OtherAllocator>
|
2046
|
+
void swap(vector<T, OtherAllocator> & x
|
2047
|
+
, typename container_detail::enable_if_and
|
2048
|
+
< void
|
2049
|
+
, container_detail::is_version<OtherAllocator, 0>
|
2050
|
+
, container_detail::is_different<OtherAllocator, allocator_type>
|
2051
|
+
>::type * = 0
|
2052
|
+
)
|
2053
|
+
{ this->m_holder.deep_swap(x.m_holder); }
|
2054
|
+
|
2055
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
2056
|
+
|
2057
|
+
//! <b>Effects</b>: Erases all the elements of the vector.
|
2058
|
+
//!
|
2059
|
+
//! <b>Throws</b>: Nothing.
|
2060
|
+
//!
|
2061
|
+
//! <b>Complexity</b>: Linear to the number of elements in the container.
|
2062
|
+
void clear() BOOST_NOEXCEPT_OR_NOTHROW
|
2063
|
+
{ this->priv_destroy_all(); }
|
2064
|
+
|
2065
|
+
//! <b>Effects</b>: Returns true if x and y are equal
|
2066
|
+
//!
|
2067
|
+
//! <b>Complexity</b>: Linear to the number of elements in the container.
|
2068
|
+
friend bool operator==(const vector& x, const vector& y)
|
2069
|
+
{ return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
|
2070
|
+
|
2071
|
+
//! <b>Effects</b>: Returns true if x and y are unequal
|
2072
|
+
//!
|
2073
|
+
//! <b>Complexity</b>: Linear to the number of elements in the container.
|
2074
|
+
friend bool operator!=(const vector& x, const vector& y)
|
2075
|
+
{ return !(x == y); }
|
2076
|
+
|
2077
|
+
//! <b>Effects</b>: Returns true if x is less than y
|
2078
|
+
//!
|
2079
|
+
//! <b>Complexity</b>: Linear to the number of elements in the container.
|
2080
|
+
friend bool operator<(const vector& x, const vector& y)
|
2081
|
+
{
|
2082
|
+
const_iterator first1(x.cbegin()), first2(y.cbegin());
|
2083
|
+
const const_iterator last1(x.cend()), last2(y.cend());
|
2084
|
+
for ( ; (first1 != last1) && (first2 != last2); ++first1, ++first2 ) {
|
2085
|
+
if (*first1 < *first2) return true;
|
2086
|
+
if (*first2 < *first1) return false;
|
2087
|
+
}
|
2088
|
+
return (first1 == last1) && (first2 != last2);
|
2089
|
+
}
|
2090
|
+
|
2091
|
+
//! <b>Effects</b>: Returns true if x is greater than y
|
2092
|
+
//!
|
2093
|
+
//! <b>Complexity</b>: Linear to the number of elements in the container.
|
2094
|
+
friend bool operator>(const vector& x, const vector& y)
|
2095
|
+
{ return y < x; }
|
2096
|
+
|
2097
|
+
//! <b>Effects</b>: Returns true if x is equal or less than y
|
2098
|
+
//!
|
2099
|
+
//! <b>Complexity</b>: Linear to the number of elements in the container.
|
2100
|
+
friend bool operator<=(const vector& x, const vector& y)
|
2101
|
+
{ return !(y < x); }
|
2102
|
+
|
2103
|
+
//! <b>Effects</b>: Returns true if x is equal or greater than y
|
2104
|
+
//!
|
2105
|
+
//! <b>Complexity</b>: Linear to the number of elements in the container.
|
2106
|
+
friend bool operator>=(const vector& x, const vector& y)
|
2107
|
+
{ return !(x < y); }
|
2108
|
+
|
2109
|
+
//! <b>Effects</b>: x.swap(y)
|
2110
|
+
//!
|
2111
|
+
//! <b>Complexity</b>: Constant.
|
2112
|
+
friend void swap(vector& x, vector& y)
|
2113
|
+
{ x.swap(y); }
|
2114
|
+
|
2115
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
2116
|
+
//! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
|
2117
|
+
//! effect. Otherwise, it is a request for allocation of additional memory
|
2118
|
+
//! (memory expansion) that will not invalidate iterators.
|
2119
|
+
//! If the request is successful, then capacity() is greater than or equal to
|
2120
|
+
//! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
|
2121
|
+
//!
|
2122
|
+
//! <b>Throws</b>: If memory allocation allocation throws or T's copy/move constructor throws.
|
2123
|
+
//!
|
2124
|
+
//! <b>Note</b>: Non-standard extension.
|
2125
|
+
bool stable_reserve(size_type new_cap)
|
2126
|
+
{
|
2127
|
+
const size_type cp = this->capacity();
|
2128
|
+
return cp >= new_cap || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(new_cap - cp));
|
2129
|
+
}
|
2130
|
+
|
2131
|
+
//Absolutely experimental. This function might change, disappear or simply crash!
|
2132
|
+
template<class BiDirPosConstIt, class BiDirValueIt>
|
2133
|
+
void insert_ordered_at(const size_type element_count, BiDirPosConstIt last_position_it, BiDirValueIt last_value_it)
|
2134
|
+
{
|
2135
|
+
typedef container_detail::vector_insert_ordered_cursor<BiDirPosConstIt, BiDirValueIt> inserter_t;
|
2136
|
+
return this->priv_insert_ordered_at(element_count, inserter_t(last_position_it, last_value_it));
|
2137
|
+
}
|
2138
|
+
|
2139
|
+
template<class BidirIt>
|
2140
|
+
void merge(BidirIt first, BidirIt last)
|
2141
|
+
{ this->merge(first, last, value_less()); }
|
2142
|
+
|
2143
|
+
template<class BidirIt, class Compare>
|
2144
|
+
void merge(BidirIt first, BidirIt last, Compare comp)
|
2145
|
+
{ this->priv_merge(container_detail::false_type(), first, last, comp); }
|
2146
|
+
|
2147
|
+
template<class BidirIt>
|
2148
|
+
void merge_unique(BidirIt first, BidirIt last)
|
2149
|
+
{ this->priv_merge(container_detail::true_type(), first, last, value_less()); }
|
2150
|
+
|
2151
|
+
template<class BidirIt, class Compare>
|
2152
|
+
void merge_unique(BidirIt first, BidirIt last, Compare comp)
|
2153
|
+
{ this->priv_merge(container_detail::true_type(), first, last, comp); }
|
2154
|
+
|
2155
|
+
private:
|
2156
|
+
template<class PositionValue>
|
2157
|
+
void priv_insert_ordered_at(const size_type element_count, PositionValue position_value)
|
2158
|
+
{
|
2159
|
+
const size_type old_size_pos = this->size();
|
2160
|
+
this->reserve(old_size_pos + element_count);
|
2161
|
+
T* const begin_ptr = this->priv_raw_begin();
|
2162
|
+
size_type insertions_left = element_count;
|
2163
|
+
size_type prev_pos = old_size_pos;
|
2164
|
+
size_type old_hole_size = element_count;
|
2165
|
+
|
2166
|
+
//Exception rollback. If any copy throws before the hole is filled, values
|
2167
|
+
//already inserted/copied at the end of the buffer will be destroyed.
|
2168
|
+
typename value_traits::ArrayDestructor past_hole_values_destroyer
|
2169
|
+
(begin_ptr + old_size_pos + element_count, this->m_holder.alloc(), size_type(0u));
|
2170
|
+
//Loop for each insertion backwards, first moving the elements after the insertion point,
|
2171
|
+
//then inserting the element.
|
2172
|
+
while(insertions_left){
|
2173
|
+
--position_value;
|
2174
|
+
size_type const pos = position_value.get_pos();
|
2175
|
+
BOOST_ASSERT(pos != size_type(-1) && pos <= old_size_pos && pos <= prev_pos);
|
2176
|
+
//If needed shift the range after the insertion point and the previous insertion point.
|
2177
|
+
//Function will take care if the shift crosses the size() boundary, using copy/move
|
2178
|
+
//or uninitialized copy/move if necessary.
|
2179
|
+
size_type new_hole_size = (pos != prev_pos)
|
2180
|
+
? priv_insert_ordered_at_shift_range(pos, prev_pos, this->size(), insertions_left)
|
2181
|
+
: old_hole_size
|
2182
|
+
;
|
2183
|
+
if(new_hole_size){
|
2184
|
+
//The hole was reduced by priv_insert_ordered_at_shift_range so expand exception rollback range backwards
|
2185
|
+
past_hole_values_destroyer.increment_size_backwards(prev_pos - pos);
|
2186
|
+
//Insert the new value in the hole
|
2187
|
+
allocator_traits_type::construct(this->m_holder.alloc(), begin_ptr + pos + insertions_left - 1, position_value.get_val());
|
2188
|
+
if(--new_hole_size){
|
2189
|
+
//The hole was reduced by the new insertion by one
|
2190
|
+
past_hole_values_destroyer.increment_size_backwards(size_type(1u));
|
2191
|
+
}
|
2192
|
+
else{
|
2193
|
+
//Hole was just filled, disable exception rollback and change vector size
|
2194
|
+
past_hole_values_destroyer.release();
|
2195
|
+
this->m_holder.m_size += element_count;
|
2196
|
+
}
|
2197
|
+
}
|
2198
|
+
else{
|
2199
|
+
if(old_hole_size){
|
2200
|
+
//Hole was just filled by priv_insert_ordered_at_shift_range, disable exception rollback and change vector size
|
2201
|
+
past_hole_values_destroyer.release();
|
2202
|
+
this->m_holder.m_size += element_count;
|
2203
|
+
}
|
2204
|
+
//Insert the new value in the already constructed range
|
2205
|
+
begin_ptr[pos + insertions_left - 1] = position_value.get_val();
|
2206
|
+
}
|
2207
|
+
--insertions_left;
|
2208
|
+
old_hole_size = new_hole_size;
|
2209
|
+
prev_pos = pos;
|
2210
|
+
}
|
1518
2211
|
}
|
1519
2212
|
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
2213
|
+
template<class UniqueBool, class BidirIt, class Compare>
|
2214
|
+
void priv_merge(UniqueBool, BidirIt first, BidirIt last, Compare comp)
|
2215
|
+
{
|
2216
|
+
size_type const n = static_cast<size_type>(boost::container::iterator_distance(first, last));
|
2217
|
+
size_type const s = this->size();
|
2218
|
+
if(BOOST_LIKELY(s)){
|
2219
|
+
size_type const c = this->capacity();
|
2220
|
+
size_type const free_c = (c - s);
|
2221
|
+
//Use a new buffer if current one is too small for new elements,
|
2222
|
+
//or there is no room for position indexes
|
2223
|
+
if(free_c < n){
|
2224
|
+
size_type const new_size = s + n;
|
2225
|
+
size_type new_cap = new_size;
|
2226
|
+
pointer p = pointer();
|
2227
|
+
p = this->m_holder.allocation_command(allocate_new, new_size, new_cap, p);
|
2228
|
+
this->priv_merge_in_new_buffer(UniqueBool(), first, n, comp, p, new_cap);
|
2229
|
+
}
|
2230
|
+
else if(!UniqueBool::value && free_c >= n){
|
2231
|
+
typedef container_detail::vector_merge_cursor<T, size_type, BidirIt, Compare> inserter_t;
|
2232
|
+
T* const pbeg = this->priv_raw_begin();
|
2233
|
+
return this->priv_insert_ordered_at(n, inserter_t(pbeg, pbeg + s, last, comp));
|
2234
|
+
}
|
2235
|
+
else{ //UniqueBool::value == true and free_c >= n
|
2236
|
+
std::size_t remaining = n;
|
2237
|
+
static const std::size_t PosCount = 64u;
|
2238
|
+
size_type positions[PosCount];
|
2239
|
+
size_type *indexes = 0;
|
2240
|
+
while(remaining){
|
2241
|
+
//Query for room to store indexes in the remaining buffer
|
2242
|
+
uintptr_t const szt_align_mask = container_detail::alignment_of<size_type>::value - 1;
|
2243
|
+
boost::uintptr_t const addr = boost::uintptr_t(this->priv_raw_begin() + s + n);
|
2244
|
+
boost::uintptr_t const capaddr = boost::uintptr_t(this->priv_raw_begin() + c);
|
2245
|
+
boost::uintptr_t const aligned_addr = (addr + szt_align_mask) & ~szt_align_mask;
|
2246
|
+
indexes = reinterpret_cast<size_type *>(aligned_addr);
|
2247
|
+
std::size_t index_capacity = (aligned_addr >= capaddr) ? 0u : (capaddr - addr)/sizeof(size_type);
|
2248
|
+
|
2249
|
+
//Capacity is constant, we're not going to change it
|
2250
|
+
if(index_capacity < PosCount){
|
2251
|
+
indexes = positions;
|
2252
|
+
index_capacity = PosCount;
|
2253
|
+
}
|
2254
|
+
if(index_capacity > remaining)
|
2255
|
+
index_capacity = remaining;
|
2256
|
+
BidirIt limit = first;
|
2257
|
+
boost::container::iterator_advance(limit, index_capacity);
|
2258
|
+
this->priv_insert_ordered_range(UniqueBool(), index_capacity, first, limit, indexes, comp);
|
2259
|
+
first = limit;
|
2260
|
+
remaining -= index_capacity;
|
2261
|
+
}
|
2262
|
+
}
|
2263
|
+
}
|
2264
|
+
else{
|
2265
|
+
this->insert(this->cend(), n, first, last);
|
2266
|
+
}
|
1533
2267
|
}
|
1534
2268
|
|
1535
|
-
|
2269
|
+
template <class UniqueBool, class BidirIt, class Compare>
|
2270
|
+
void priv_insert_ordered_range
|
2271
|
+
(UniqueBool, size_type const n, BidirIt first, BidirIt const last, size_type positions[], Compare comp)
|
2272
|
+
{
|
2273
|
+
//Linear: at most N + M -1 comparisons
|
2274
|
+
//Log: MlogN
|
2275
|
+
//Average
|
2276
|
+
//Linear: N + M - 2
|
2277
|
+
//Log: MlogN
|
2278
|
+
//N+M - 2
|
2279
|
+
//N
|
2280
|
+
//(N+M)/2 < MlogN
|
2281
|
+
//(N/M+1)/2 <= logN
|
2282
|
+
//bool const linear = !s || !n || (s <= n) || ((s+n)/n/2 < logN);
|
2283
|
+
size_type const s = this->size();
|
2284
|
+
size_type remaining = n;
|
2285
|
+
T* const pbeg = this->priv_raw_begin();
|
2286
|
+
T* const pend = pbeg + s;
|
2287
|
+
T* pcur = pbeg;
|
2288
|
+
size_type *position = positions;
|
2289
|
+
size_type added_in_middle = 0;
|
2290
|
+
if(first != last && pcur != pend){
|
2291
|
+
while(1){
|
2292
|
+
//maintain stability moving external values only if they are strictly less
|
2293
|
+
if(comp(*first, *pcur)) {
|
2294
|
+
*position = static_cast<size_type>(pcur - pbeg);
|
2295
|
+
BOOST_ASSERT((position == positions) || (*(position-1) == size_type(-1)) || (*(position-1) <= *position));
|
2296
|
+
++position;
|
2297
|
+
++added_in_middle;
|
2298
|
+
--remaining;
|
2299
|
+
if(++first == last) break;
|
2300
|
+
}
|
2301
|
+
else if(UniqueBool::value && !comp(*pcur, *first)){
|
2302
|
+
*position = size_type(-1);
|
2303
|
+
++position;
|
2304
|
+
--remaining;
|
2305
|
+
if(++first == last) break;
|
2306
|
+
}
|
2307
|
+
else{
|
2308
|
+
if(++pcur == pend) break;
|
2309
|
+
}
|
2310
|
+
}
|
2311
|
+
}
|
2312
|
+
this->insert_ordered_at(added_in_middle, position, first);
|
2313
|
+
this->insert(this->cend(), remaining, first, last);
|
2314
|
+
}
|
2315
|
+
|
2316
|
+
template<class UniqueBool, class FwdIt, class Compare>
|
2317
|
+
void priv_merge_in_new_buffer
|
2318
|
+
(UniqueBool, FwdIt first, size_type n, Compare comp, pointer new_storage, size_type const new_cap)
|
2319
|
+
{
|
2320
|
+
BOOST_ASSERT((new_cap >= this->size() ) && (new_cap - this->size()) >= n);
|
2321
|
+
allocator_type &a = this->m_holder.alloc();
|
2322
|
+
typename value_traits::ArrayDeallocator new_buffer_deallocator(new_storage, a, new_cap);
|
2323
|
+
typename value_traits::ArrayDestructor new_values_destroyer(new_storage, a, 0u);
|
2324
|
+
T* pbeg = this->priv_raw_begin();
|
2325
|
+
size_type const old_size = this->size();
|
2326
|
+
T* const pend = pbeg + old_size;
|
2327
|
+
T* d_first = container_detail::to_raw_pointer(new_storage);
|
2328
|
+
size_type added = n;
|
2329
|
+
//Merge in new buffer loop
|
2330
|
+
while(1){
|
2331
|
+
if(!n) {
|
2332
|
+
::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pbeg, pend, d_first);
|
2333
|
+
break;
|
2334
|
+
}
|
2335
|
+
else if(pbeg == pend) {
|
2336
|
+
::boost::container::uninitialized_move_alloc_n(this->m_holder.alloc(), first, n, d_first);
|
2337
|
+
break;
|
2338
|
+
}
|
2339
|
+
//maintain stability moving external values only if they are strictly less
|
2340
|
+
else if(comp(*first, *pbeg)) {
|
2341
|
+
allocator_traits_type::construct( this->m_holder.alloc(), d_first, ::boost::move(*first) );
|
2342
|
+
new_values_destroyer.increment_size(1u);
|
2343
|
+
++first;
|
2344
|
+
--n;
|
2345
|
+
++d_first;
|
2346
|
+
}
|
2347
|
+
else if(UniqueBool::value && !comp(*pbeg, *first)){
|
2348
|
+
++first;
|
2349
|
+
--n;
|
2350
|
+
--added;
|
2351
|
+
}
|
2352
|
+
else{
|
2353
|
+
allocator_traits_type::construct( this->m_holder.alloc(), d_first, ::boost::move(*pbeg) );
|
2354
|
+
new_values_destroyer.increment_size(1u);
|
2355
|
+
++pbeg;
|
2356
|
+
++d_first;
|
2357
|
+
}
|
2358
|
+
}
|
1536
2359
|
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
2360
|
+
//Nothrow operations
|
2361
|
+
pointer const old_p = this->m_holder.start();
|
2362
|
+
size_type const old_cap = this->m_holder.capacity();
|
2363
|
+
boost::container::destroy_alloc_n(a, container_detail::to_raw_pointer(old_p), old_size);
|
2364
|
+
a.deallocate(old_p, old_cap);
|
2365
|
+
this->m_holder.m_size = old_size + added;
|
2366
|
+
this->m_holder.start(new_storage);
|
2367
|
+
this->m_holder.capacity(new_cap);
|
2368
|
+
new_buffer_deallocator.release();
|
2369
|
+
new_values_destroyer.release();
|
2370
|
+
}
|
1544
2371
|
|
1545
|
-
|
2372
|
+
bool room_enough() const
|
2373
|
+
{ return this->m_holder.m_size < this->m_holder.capacity(); }
|
1546
2374
|
|
1547
|
-
|
1548
|
-
|
1549
|
-
void insert_ordered_at(size_type element_count, BiDirPosConstIt last_position_it, BiDirValueIt last_value_it)
|
1550
|
-
{
|
1551
|
-
const size_type *dummy = 0;
|
1552
|
-
this->priv_insert_ordered_at(element_count, last_position_it, false, &dummy[0], last_value_it);
|
1553
|
-
}
|
2375
|
+
pointer back_ptr() const
|
2376
|
+
{ return this->m_holder.start() + this->m_holder.m_size; }
|
1554
2377
|
|
1555
|
-
|
1556
|
-
template<class BiDirPosConstIt, class BiDirSkipConstIt, class BiDirValueIt>
|
1557
|
-
void insert_ordered_at(size_type element_count, BiDirPosConstIt last_position_it, BiDirSkipConstIt last_skip_it, BiDirValueIt last_value_it)
|
2378
|
+
size_type priv_index_of(pointer p) const
|
1558
2379
|
{
|
1559
|
-
this->
|
2380
|
+
BOOST_ASSERT(this->m_holder.start() <= p);
|
2381
|
+
BOOST_ASSERT(p <= (this->m_holder.start()+this->size()));
|
2382
|
+
return static_cast<size_type>(p - this->m_holder.start());
|
1560
2383
|
}
|
1561
2384
|
|
1562
|
-
|
1563
|
-
|
1564
|
-
template<class OtherAllocator, class AllocVersion>
|
2385
|
+
template<class OtherAllocator>
|
1565
2386
|
void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
|
1566
|
-
, AllocVersion
|
1567
2387
|
, typename container_detail::enable_if_c
|
1568
|
-
< container_detail::
|
1569
|
-
!container_detail::is_same<OtherAllocator, allocator_type>::value
|
1570
|
-
>::type * = 0)
|
2388
|
+
< container_detail::is_version<OtherAllocator, 0>::value >::type * = 0)
|
1571
2389
|
{
|
1572
|
-
if(
|
2390
|
+
if(!container_detail::is_same<OtherAllocator, allocator_type>::value &&
|
2391
|
+
this->capacity() < x.size()){
|
1573
2392
|
throw_bad_alloc();
|
1574
2393
|
}
|
1575
|
-
this->
|
1576
|
-
|
1577
|
-
|
1578
|
-
template<class OtherAllocator, class AllocVersion>
|
1579
|
-
void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
|
1580
|
-
, AllocVersion
|
1581
|
-
, typename container_detail::enable_if_c
|
1582
|
-
< !container_detail::is_same<AllocVersion, allocator_v0>::value ||
|
1583
|
-
container_detail::is_same<OtherAllocator, allocator_type>::value
|
1584
|
-
>::type * = 0)
|
1585
|
-
{
|
1586
|
-
this->priv_move_assign_impl(boost::move(x), AllocVersion());
|
1587
|
-
}
|
1588
|
-
|
1589
|
-
template<class OtherAllocator, class AllocVersion>
|
1590
|
-
void priv_move_assign_impl(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
|
1591
|
-
, AllocVersion
|
1592
|
-
, typename container_detail::enable_if_c
|
1593
|
-
< container_detail::is_same<AllocVersion, allocator_v0>::value
|
1594
|
-
>::type * = 0)
|
1595
|
-
{
|
1596
|
-
T* const this_start = container_detail::to_raw_pointer(m_holder.start());
|
1597
|
-
T* const other_start = container_detail::to_raw_pointer(x.m_holder.start());
|
2394
|
+
T* const this_start = this->priv_raw_begin();
|
2395
|
+
T* const other_start = x.priv_raw_begin();
|
1598
2396
|
const size_type this_sz = m_holder.m_size;
|
1599
2397
|
const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
|
1600
2398
|
boost::container::move_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
|
1601
2399
|
this->m_holder.m_size = other_sz;
|
1602
2400
|
}
|
1603
2401
|
|
1604
|
-
template<class OtherAllocator
|
1605
|
-
void
|
1606
|
-
,
|
1607
|
-
|
1608
|
-
|
2402
|
+
template<class OtherAllocator>
|
2403
|
+
void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
|
2404
|
+
, typename container_detail::disable_if_or
|
2405
|
+
< void
|
2406
|
+
, container_detail::is_version<OtherAllocator, 0>
|
2407
|
+
, container_detail::is_different<OtherAllocator, allocator_type>
|
1609
2408
|
>::type * = 0)
|
1610
2409
|
{
|
1611
|
-
//for move
|
2410
|
+
//for move assignment, no aliasing (&x != this) is assummed.
|
2411
|
+
BOOST_ASSERT(this != &x);
|
1612
2412
|
allocator_type &this_alloc = this->m_holder.alloc();
|
1613
2413
|
allocator_type &x_alloc = x.m_holder.alloc();
|
1614
|
-
|
1615
|
-
|
2414
|
+
const bool propagate_alloc = allocator_traits_type::propagate_on_container_move_assignment::value;
|
2415
|
+
|
2416
|
+
const bool is_propagable_from_x = is_propagable_from(x_alloc, x.m_holder.start(), this_alloc, propagate_alloc);
|
2417
|
+
const bool is_propagable_from_t = is_propagable_from(this_alloc, m_holder.start(), x_alloc, propagate_alloc);
|
2418
|
+
const bool are_both_propagable = is_propagable_from_x && is_propagable_from_t;
|
2419
|
+
|
2420
|
+
//Resources can be transferred if both allocators are
|
2421
|
+
//going to be equal after this function (either propagated or already equal)
|
2422
|
+
if(are_both_propagable){
|
1616
2423
|
//Destroy objects but retain memory in case x reuses it in the future
|
1617
2424
|
this->clear();
|
1618
|
-
this->m_holder.
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
2425
|
+
this->m_holder.swap_resources(x.m_holder);
|
2426
|
+
}
|
2427
|
+
else if(is_propagable_from_x){
|
2428
|
+
this->clear();
|
2429
|
+
this->m_holder.alloc().deallocate(this->m_holder.m_start, this->m_holder.m_capacity);
|
2430
|
+
this->m_holder.steal_resources(x.m_holder);
|
1623
2431
|
}
|
1624
|
-
//
|
2432
|
+
//Else do a one by one move
|
1625
2433
|
else{
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
2434
|
+
this->assign( boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.begin()))
|
2435
|
+
, boost::make_move_iterator(container_detail::iterator_to_raw_pointer(x.end() ))
|
2436
|
+
);
|
1629
2437
|
}
|
2438
|
+
//Move allocator if needed
|
2439
|
+
container_detail::move_alloc(this_alloc, x_alloc, container_detail::bool_<propagate_alloc>());
|
1630
2440
|
}
|
1631
2441
|
|
1632
|
-
template<class
|
1633
|
-
void priv_copy_assign(const vector &x
|
2442
|
+
template<class OtherAllocator>
|
2443
|
+
void priv_copy_assign(const vector<T, OtherAllocator> &x
|
1634
2444
|
, typename container_detail::enable_if_c
|
1635
|
-
< container_detail::
|
1636
|
-
>::type * = 0)
|
2445
|
+
< container_detail::is_version<OtherAllocator, 0>::value >::type * = 0)
|
1637
2446
|
{
|
1638
|
-
|
1639
|
-
|
2447
|
+
if(!container_detail::is_same<OtherAllocator, allocator_type>::value &&
|
2448
|
+
this->capacity() < x.size()){
|
2449
|
+
throw_bad_alloc();
|
2450
|
+
}
|
2451
|
+
T* const this_start = this->priv_raw_begin();
|
2452
|
+
T* const other_start = x.priv_raw_begin();
|
1640
2453
|
const size_type this_sz = m_holder.m_size;
|
1641
2454
|
const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
|
1642
2455
|
boost::container::copy_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
|
1643
2456
|
this->m_holder.m_size = other_sz;
|
1644
2457
|
}
|
1645
2458
|
|
1646
|
-
template<class
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
2459
|
+
template<class OtherAllocator>
|
2460
|
+
typename container_detail::disable_if_or
|
2461
|
+
< void
|
2462
|
+
, container_detail::is_version<OtherAllocator, 0>
|
2463
|
+
, container_detail::is_different<OtherAllocator, allocator_type>
|
2464
|
+
>::type
|
2465
|
+
priv_copy_assign(const vector<T, OtherAllocator> &x)
|
1651
2466
|
{
|
1652
2467
|
allocator_type &this_alloc = this->m_holder.alloc();
|
1653
2468
|
const allocator_type &x_alloc = x.m_holder.alloc();
|
@@ -1658,158 +2473,192 @@ class vector
|
|
1658
2473
|
this->shrink_to_fit();
|
1659
2474
|
}
|
1660
2475
|
container_detail::assign_alloc(this_alloc, x_alloc, flag);
|
1661
|
-
this->assign(
|
1662
|
-
, container_detail::to_raw_pointer(x.m_holder.start() + x.m_holder.m_size));
|
2476
|
+
this->assign( x.priv_raw_begin(), x.priv_raw_end() );
|
1663
2477
|
}
|
1664
2478
|
|
1665
|
-
|
2479
|
+
template<class Vector> //Template it to avoid it in explicit instantiations
|
2480
|
+
void priv_swap(Vector &x, container_detail::true_type) //version_0
|
2481
|
+
{ this->m_holder.deep_swap(x.m_holder); }
|
2482
|
+
|
2483
|
+
template<class Vector> //Template it to avoid it in explicit instantiations
|
2484
|
+
void priv_swap(Vector &x, container_detail::false_type) //version_N
|
1666
2485
|
{
|
1667
|
-
|
2486
|
+
const bool propagate_alloc = allocator_traits_type::propagate_on_container_swap::value;
|
2487
|
+
if(are_swap_propagable( this->get_stored_allocator(), this->m_holder.start()
|
2488
|
+
, x.get_stored_allocator(), x.m_holder.start(), propagate_alloc)){
|
2489
|
+
//Just swap internals
|
2490
|
+
this->m_holder.swap_resources(x.m_holder);
|
2491
|
+
}
|
2492
|
+
else{
|
2493
|
+
//Else swap element by element...
|
2494
|
+
bool const t_smaller = this->size() < x.size();
|
2495
|
+
vector &sml = t_smaller ? *this : x;
|
2496
|
+
vector &big = t_smaller ? x : *this;
|
2497
|
+
|
2498
|
+
size_type const common_elements = sml.size();
|
2499
|
+
for(size_type i = 0; i != common_elements; ++i){
|
2500
|
+
boost::adl_move_swap(sml[i], big[i]);
|
2501
|
+
}
|
2502
|
+
//... and move-insert the remaining range
|
2503
|
+
sml.insert( sml.cend()
|
2504
|
+
, boost::make_move_iterator(container_detail::iterator_to_raw_pointer(big.nth(common_elements)))
|
2505
|
+
, boost::make_move_iterator(container_detail::iterator_to_raw_pointer(big.end()))
|
2506
|
+
);
|
2507
|
+
//Destroy remaining elements
|
2508
|
+
big.erase(big.nth(common_elements), big.cend());
|
2509
|
+
}
|
2510
|
+
//And now swap the allocator
|
2511
|
+
container_detail::swap_alloc(this->m_holder.alloc(), x.m_holder.alloc(), container_detail::bool_<propagate_alloc>());
|
2512
|
+
}
|
2513
|
+
|
2514
|
+
void priv_reserve_no_capacity(size_type, version_0)
|
2515
|
+
{ throw_bad_alloc(); }
|
2516
|
+
|
2517
|
+
container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*> priv_dummy_empty_proxy()
|
2518
|
+
{
|
2519
|
+
return container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
|
2520
|
+
(::boost::make_move_iterator((T *)0));
|
1668
2521
|
}
|
1669
2522
|
|
1670
|
-
void
|
2523
|
+
void priv_reserve_no_capacity(size_type new_cap, version_1)
|
1671
2524
|
{
|
1672
2525
|
//There is not enough memory, allocate a new buffer
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
T * const raw_beg = container_detail::to_raw_pointer(this->m_holder.start());
|
1679
|
-
const size_type sz = m_holder.m_size;
|
1680
|
-
::boost::container::uninitialized_move_alloc_n_source
|
1681
|
-
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(p) );
|
1682
|
-
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
|
1683
|
-
this->m_holder.start(p);
|
1684
|
-
this->m_holder.capacity(new_cap);
|
2526
|
+
//Pass the hint so that allocators can take advantage of this.
|
2527
|
+
pointer const p = allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start);
|
2528
|
+
//We will reuse insert code, so create a dummy input iterator
|
2529
|
+
this->priv_forward_range_insert_new_allocation
|
2530
|
+
( container_detail::to_raw_pointer(p), new_cap, this->priv_raw_end(), 0, this->priv_dummy_empty_proxy());
|
1685
2531
|
}
|
1686
2532
|
|
1687
|
-
void
|
2533
|
+
void priv_reserve_no_capacity(size_type new_cap, version_2)
|
1688
2534
|
{
|
1689
2535
|
//There is not enough memory, allocate a new
|
1690
2536
|
//buffer or expand the old one.
|
1691
2537
|
bool same_buffer_start;
|
1692
2538
|
size_type real_cap = 0;
|
1693
|
-
|
1694
|
-
|
1695
|
-
(allocate_new | expand_fwd | expand_bwd,
|
1696
|
-
new_cap, new_cap, real_cap, this->m_holder.start());
|
2539
|
+
pointer reuse = 0;
|
2540
|
+
pointer const ret(this->m_holder.allocation_command(allocate_new | expand_fwd | expand_bwd, new_cap, real_cap = new_cap, reuse));
|
1697
2541
|
|
1698
2542
|
//Check for forward expansion
|
1699
|
-
same_buffer_start =
|
2543
|
+
same_buffer_start = reuse && this->m_holder.start() == ret;
|
1700
2544
|
if(same_buffer_start){
|
1701
2545
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1702
2546
|
++this->num_expand_fwd;
|
1703
2547
|
#endif
|
1704
2548
|
this->m_holder.capacity(real_cap);
|
1705
2549
|
}
|
1706
|
-
//If there is no forward expansion, move objects
|
1707
|
-
|
1708
|
-
|
1709
|
-
if(
|
1710
|
-
//We will reuse insert code, so create a dummy input iterator
|
1711
|
-
container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
|
1712
|
-
proxy(this->m_holder.alloc(), ::boost::make_move_iterator((T *)0));
|
2550
|
+
else{ //If there is no forward expansion, move objects, we will reuse insertion code
|
2551
|
+
T * const new_mem = container_detail::to_raw_pointer(ret);
|
2552
|
+
T * const ins_pos = this->priv_raw_end();
|
2553
|
+
if(reuse){ //Backwards (and possibly forward) expansion
|
1713
2554
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1714
2555
|
++this->num_expand_bwd;
|
1715
2556
|
#endif
|
1716
2557
|
this->priv_forward_range_insert_expand_backwards
|
1717
|
-
(
|
1718
|
-
, real_cap
|
1719
|
-
, container_detail::to_raw_pointer(this->m_holder.start())
|
1720
|
-
, 0
|
1721
|
-
, proxy);
|
2558
|
+
( new_mem , real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
|
1722
2559
|
}
|
1723
|
-
//New buffer
|
1724
|
-
else{
|
1725
|
-
//Backwards (and possibly forward) expansion
|
2560
|
+
else{ //New buffer
|
1726
2561
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1727
2562
|
++this->num_alloc;
|
1728
2563
|
#endif
|
1729
|
-
|
1730
|
-
|
1731
|
-
::boost::container::uninitialized_move_alloc_n_source
|
1732
|
-
( this->m_holder.alloc(), raw_beg, sz, container_detail::to_raw_pointer(ret.first) );
|
1733
|
-
boost::container::destroy_alloc_n(this->m_holder.alloc(), raw_beg, sz);
|
1734
|
-
this->m_holder.start(ret.first);
|
1735
|
-
this->m_holder.capacity(real_cap);
|
2564
|
+
this->priv_forward_range_insert_new_allocation
|
2565
|
+
( new_mem, real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
|
1736
2566
|
}
|
1737
2567
|
}
|
1738
2568
|
}
|
1739
2569
|
|
1740
|
-
|
1741
|
-
void priv_uninitialized_fill(Proxy proxy, size_type n) const
|
2570
|
+
void priv_destroy_last(const bool moved = false) BOOST_NOEXCEPT_OR_NOTHROW
|
1742
2571
|
{
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
2572
|
+
(void)moved;
|
2573
|
+
if(!(value_traits::trivial_dctr || (value_traits::trivial_dctr_after_move && moved))){
|
2574
|
+
value_type* const p = this->priv_raw_end() - 1;
|
2575
|
+
allocator_traits_type::destroy(this->get_stored_allocator(), p);
|
2576
|
+
}
|
2577
|
+
--this->m_holder.m_size;
|
1747
2578
|
}
|
1748
2579
|
|
1749
|
-
void
|
2580
|
+
void priv_destroy_last_n(const size_type n) BOOST_NOEXCEPT_OR_NOTHROW
|
1750
2581
|
{
|
1751
|
-
|
1752
|
-
|
2582
|
+
BOOST_ASSERT(n <= this->m_holder.m_size);
|
2583
|
+
if(!value_traits::trivial_dctr){
|
2584
|
+
T* const destroy_pos = this->priv_raw_begin() + (this->m_holder.m_size-n);
|
2585
|
+
boost::container::destroy_alloc_n(this->get_stored_allocator(), destroy_pos, n);
|
2586
|
+
}
|
2587
|
+
this->m_holder.m_size -= n;
|
1753
2588
|
}
|
1754
2589
|
|
1755
|
-
|
2590
|
+
template<class InpIt>
|
2591
|
+
void priv_uninitialized_construct_at_end(InpIt first, InpIt last)
|
1756
2592
|
{
|
1757
|
-
T* const
|
1758
|
-
boost::container::
|
1759
|
-
this->m_holder.m_size
|
2593
|
+
T* const old_end_pos = this->priv_raw_end();
|
2594
|
+
T* const new_end_pos = boost::container::uninitialized_copy_alloc(this->m_holder.alloc(), first, last, old_end_pos);
|
2595
|
+
this->m_holder.m_size += new_end_pos - old_end_pos;
|
1760
2596
|
}
|
1761
2597
|
|
1762
|
-
void priv_destroy_all()
|
2598
|
+
void priv_destroy_all() BOOST_NOEXCEPT_OR_NOTHROW
|
1763
2599
|
{
|
1764
2600
|
boost::container::destroy_alloc_n
|
1765
|
-
(this->get_stored_allocator(),
|
2601
|
+
(this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
|
1766
2602
|
this->m_holder.m_size = 0;
|
1767
2603
|
}
|
1768
2604
|
|
1769
2605
|
template<class U>
|
1770
2606
|
iterator priv_insert(const const_iterator &p, BOOST_FWD_REF(U) x)
|
1771
2607
|
{
|
2608
|
+
BOOST_ASSERT(this->priv_in_range_or_end(p));
|
1772
2609
|
return this->priv_forward_range_insert
|
1773
|
-
( vector_iterator_get_ptr(p), 1, container_detail::get_insert_value_proxy<T
|
1774
|
-
, ::boost::forward<U>(x)), alloc_version());
|
2610
|
+
( vector_iterator_get_ptr(p), 1, container_detail::get_insert_value_proxy<T*, Allocator>(::boost::forward<U>(x)));
|
1775
2611
|
}
|
1776
2612
|
|
1777
|
-
|
2613
|
+
container_detail::insert_copy_proxy<Allocator, T*> priv_single_insert_proxy(const T &x)
|
2614
|
+
{ return container_detail::insert_copy_proxy<Allocator, T*> (x); }
|
2615
|
+
|
2616
|
+
container_detail::insert_move_proxy<Allocator, T*> priv_single_insert_proxy(BOOST_RV_REF(T) x)
|
2617
|
+
{ return container_detail::insert_move_proxy<Allocator, T*> (x); }
|
2618
|
+
|
2619
|
+
template <class U>
|
2620
|
+
void priv_push_back(BOOST_FWD_REF(U) u)
|
1778
2621
|
{
|
1779
|
-
if (this->
|
2622
|
+
if (BOOST_LIKELY(this->room_enough())){
|
1780
2623
|
//There is more memory, just construct a new object at the end
|
1781
2624
|
allocator_traits_type::construct
|
1782
|
-
( this->m_holder.alloc()
|
1783
|
-
, container_detail::to_raw_pointer(this->m_holder.start() + this->m_holder.m_size)
|
1784
|
-
, x );
|
2625
|
+
( this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<U>(u) );
|
1785
2626
|
++this->m_holder.m_size;
|
1786
2627
|
}
|
1787
2628
|
else{
|
1788
|
-
|
1789
|
-
|
2629
|
+
this->priv_forward_range_insert_no_capacity
|
2630
|
+
( this->back_ptr(), 1
|
2631
|
+
, this->priv_single_insert_proxy(::boost::forward<U>(u)), alloc_version());
|
1790
2632
|
}
|
1791
2633
|
}
|
1792
2634
|
|
1793
|
-
|
2635
|
+
container_detail::insert_n_copies_proxy<Allocator, T*> priv_resize_proxy(const T &x)
|
2636
|
+
{ return container_detail::insert_n_copies_proxy<Allocator, T*>(x); }
|
2637
|
+
|
2638
|
+
container_detail::insert_default_initialized_n_proxy<Allocator, T*> priv_resize_proxy(default_init_t)
|
2639
|
+
{ return container_detail::insert_default_initialized_n_proxy<Allocator, T*>(); }
|
2640
|
+
|
2641
|
+
container_detail::insert_value_initialized_n_proxy<Allocator, T*> priv_resize_proxy(value_init_t)
|
2642
|
+
{ return container_detail::insert_value_initialized_n_proxy<Allocator, T*>(); }
|
2643
|
+
|
2644
|
+
template <class U>
|
2645
|
+
void priv_resize(size_type new_size, const U& u)
|
1794
2646
|
{
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
, container_detail::to_raw_pointer(this->m_holder.start() + this->m_holder.m_size)
|
1800
|
-
, ::boost::move(x) );
|
1801
|
-
++this->m_holder.m_size;
|
2647
|
+
const size_type sz = this->size();
|
2648
|
+
if (new_size < sz){
|
2649
|
+
//Destroy last elements
|
2650
|
+
this->priv_destroy_last_n(sz - new_size);
|
1802
2651
|
}
|
1803
2652
|
else{
|
1804
|
-
|
1805
|
-
this->
|
2653
|
+
const size_type n = new_size - this->size();
|
2654
|
+
this->priv_forward_range_insert_at_end(n, this->priv_resize_proxy(u), alloc_version());
|
1806
2655
|
}
|
1807
2656
|
}
|
1808
2657
|
|
1809
|
-
void priv_shrink_to_fit(
|
2658
|
+
void priv_shrink_to_fit(version_0) BOOST_NOEXCEPT_OR_NOTHROW
|
1810
2659
|
{}
|
1811
2660
|
|
1812
|
-
void priv_shrink_to_fit(
|
2661
|
+
void priv_shrink_to_fit(version_1)
|
1813
2662
|
{
|
1814
2663
|
const size_type cp = this->m_holder.capacity();
|
1815
2664
|
if(cp){
|
@@ -1821,25 +2670,21 @@ class vector
|
|
1821
2670
|
}
|
1822
2671
|
else if(sz < cp){
|
1823
2672
|
//Allocate a new buffer.
|
1824
|
-
|
2673
|
+
//Pass the hint so that allocators can take advantage of this.
|
2674
|
+
pointer const p = allocator_traits_type::allocate(this->m_holder.alloc(), sz, this->m_holder.m_start);
|
1825
2675
|
|
1826
2676
|
//We will reuse insert code, so create a dummy input iterator
|
1827
|
-
container_detail::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
|
1828
|
-
proxy(this->m_holder.alloc(), ::boost::make_move_iterator((T *)0));
|
1829
2677
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1830
2678
|
++this->num_alloc;
|
1831
2679
|
#endif
|
1832
2680
|
this->priv_forward_range_insert_new_allocation
|
1833
|
-
( container_detail::to_raw_pointer(p)
|
1834
|
-
,
|
1835
|
-
, container_detail::to_raw_pointer(this->m_holder.start())
|
1836
|
-
, 0
|
1837
|
-
, proxy);
|
2681
|
+
( container_detail::to_raw_pointer(p), sz
|
2682
|
+
, this->priv_raw_begin(), 0, this->priv_dummy_empty_proxy());
|
1838
2683
|
}
|
1839
2684
|
}
|
1840
2685
|
}
|
1841
2686
|
|
1842
|
-
void priv_shrink_to_fit(
|
2687
|
+
void priv_shrink_to_fit(version_2) BOOST_NOEXCEPT_OR_NOTHROW
|
1843
2688
|
{
|
1844
2689
|
const size_type cp = this->m_holder.capacity();
|
1845
2690
|
if(cp){
|
@@ -1850,10 +2695,10 @@ class vector
|
|
1850
2695
|
this->m_holder.m_capacity = 0;
|
1851
2696
|
}
|
1852
2697
|
else{
|
1853
|
-
size_type received_size;
|
2698
|
+
size_type received_size = sz;
|
2699
|
+
pointer reuse(this->m_holder.start());
|
1854
2700
|
if(this->m_holder.allocation_command
|
1855
|
-
(
|
1856
|
-
, cp, sz, received_size, this->m_holder.start()).first){
|
2701
|
+
(shrink_in_place | nothrow_allocation, cp, received_size, reuse)){
|
1857
2702
|
this->m_holder.capacity(received_size);
|
1858
2703
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1859
2704
|
++this->num_shrink;
|
@@ -1865,7 +2710,7 @@ class vector
|
|
1865
2710
|
|
1866
2711
|
template <class InsertionProxy>
|
1867
2712
|
iterator priv_forward_range_insert_no_capacity
|
1868
|
-
(const pointer &pos, const size_type, const InsertionProxy ,
|
2713
|
+
(const pointer &pos, const size_type, const InsertionProxy , version_0)
|
1869
2714
|
{
|
1870
2715
|
throw_bad_alloc();
|
1871
2716
|
return iterator(pos);
|
@@ -1873,14 +2718,16 @@ class vector
|
|
1873
2718
|
|
1874
2719
|
template <class InsertionProxy>
|
1875
2720
|
iterator priv_forward_range_insert_no_capacity
|
1876
|
-
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy,
|
2721
|
+
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_1)
|
1877
2722
|
{
|
1878
2723
|
//Check if we have enough memory or try to expand current memory
|
1879
2724
|
const size_type n_pos = pos - this->m_holder.start();
|
1880
2725
|
T *const raw_pos = container_detail::to_raw_pointer(pos);
|
1881
2726
|
|
1882
2727
|
const size_type new_cap = this->m_holder.next_capacity(n);
|
1883
|
-
|
2728
|
+
//Pass the hint so that allocators can take advantage of this.
|
2729
|
+
T * const new_buf = container_detail::to_raw_pointer
|
2730
|
+
(allocator_traits_type::allocate(this->m_holder.alloc(), new_cap, this->m_holder.m_start));
|
1884
2731
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1885
2732
|
++this->num_alloc;
|
1886
2733
|
#endif
|
@@ -1889,26 +2736,25 @@ class vector
|
|
1889
2736
|
return iterator(this->m_holder.start() + n_pos);
|
1890
2737
|
}
|
1891
2738
|
|
1892
|
-
|
1893
2739
|
template <class InsertionProxy>
|
1894
2740
|
iterator priv_forward_range_insert_no_capacity
|
1895
|
-
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy,
|
2741
|
+
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_2)
|
1896
2742
|
{
|
1897
2743
|
//Check if we have enough memory or try to expand current memory
|
1898
2744
|
T *const raw_pos = container_detail::to_raw_pointer(pos);
|
1899
|
-
const size_type n_pos = raw_pos -
|
2745
|
+
const size_type n_pos = raw_pos - this->priv_raw_begin();
|
1900
2746
|
|
1901
|
-
size_type real_cap = 0;
|
1902
2747
|
//There is not enough memory, allocate a new
|
1903
2748
|
//buffer or expand the old one.
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
2749
|
+
size_type real_cap = this->m_holder.next_capacity(n);
|
2750
|
+
pointer reuse(this->m_holder.start());
|
2751
|
+
pointer const ret (this->m_holder.allocation_command
|
2752
|
+
(allocate_new | expand_fwd | expand_bwd, this->m_holder.m_size + n, real_cap, reuse));
|
1907
2753
|
|
1908
2754
|
//Buffer reallocated
|
1909
|
-
if(
|
2755
|
+
if(reuse){
|
1910
2756
|
//Forward expansion, delay insertion
|
1911
|
-
if(this->m_holder.start() == ret
|
2757
|
+
if(this->m_holder.start() == ret){
|
1912
2758
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
1913
2759
|
++this->num_expand_fwd;
|
1914
2760
|
#endif
|
@@ -1922,8 +2768,7 @@ class vector
|
|
1922
2768
|
++this->num_expand_bwd;
|
1923
2769
|
#endif
|
1924
2770
|
this->priv_forward_range_insert_expand_backwards
|
1925
|
-
(
|
1926
|
-
, real_cap, raw_pos, n, insert_range_proxy);
|
2771
|
+
(container_detail::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
|
1927
2772
|
}
|
1928
2773
|
}
|
1929
2774
|
//New buffer
|
@@ -1932,8 +2777,7 @@ class vector
|
|
1932
2777
|
++this->num_alloc;
|
1933
2778
|
#endif
|
1934
2779
|
this->priv_forward_range_insert_new_allocation
|
1935
|
-
( container_detail::to_raw_pointer(ret
|
1936
|
-
, real_cap, raw_pos, n, insert_range_proxy);
|
2780
|
+
( container_detail::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
|
1937
2781
|
}
|
1938
2782
|
|
1939
2783
|
return iterator(this->m_holder.start() + n_pos);
|
@@ -1941,44 +2785,9 @@ class vector
|
|
1941
2785
|
|
1942
2786
|
template <class InsertionProxy>
|
1943
2787
|
iterator priv_forward_range_insert
|
1944
|
-
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy
|
1945
|
-
{
|
1946
|
-
//Check if we have enough memory or try to expand current memory
|
1947
|
-
const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
|
1948
|
-
|
1949
|
-
if (n > remaining){
|
1950
|
-
//This will trigger an error
|
1951
|
-
throw_bad_alloc();
|
1952
|
-
}
|
1953
|
-
const size_type n_pos = pos - this->m_holder.start();
|
1954
|
-
T *const raw_pos = container_detail::to_raw_pointer(pos);
|
1955
|
-
this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
|
1956
|
-
return iterator(this->m_holder.start() + n_pos);
|
1957
|
-
}
|
1958
|
-
|
1959
|
-
template <class InsertionProxy>
|
1960
|
-
iterator priv_forward_range_insert
|
1961
|
-
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, allocator_v1)
|
1962
|
-
{
|
1963
|
-
//Check if we have enough memory or try to expand current memory
|
1964
|
-
const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
|
1965
|
-
T *const raw_pos = container_detail::to_raw_pointer(pos);
|
1966
|
-
|
1967
|
-
if (n <= remaining){
|
1968
|
-
const size_type n_pos = raw_pos - container_detail::to_raw_pointer(this->m_holder.start());
|
1969
|
-
this->priv_forward_range_insert_expand_forward
|
1970
|
-
(raw_pos, n, insert_range_proxy);
|
1971
|
-
return iterator(this->m_holder.start() + n_pos);
|
1972
|
-
}
|
1973
|
-
else{
|
1974
|
-
return this->priv_forward_range_insert_no_capacity(pos, n, insert_range_proxy, alloc_version());
|
1975
|
-
}
|
1976
|
-
}
|
1977
|
-
|
1978
|
-
template <class InsertionProxy>
|
1979
|
-
iterator priv_forward_range_insert
|
1980
|
-
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, allocator_v2)
|
2788
|
+
(const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy)
|
1981
2789
|
{
|
2790
|
+
BOOST_ASSERT(this->m_holder.capacity() >= this->m_holder.m_size);
|
1982
2791
|
//Check if we have enough memory or try to expand current memory
|
1983
2792
|
const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
|
1984
2793
|
|
@@ -1989,7 +2798,7 @@ class vector
|
|
1989
2798
|
else{
|
1990
2799
|
//Expand forward
|
1991
2800
|
T *const raw_pos = container_detail::to_raw_pointer(pos);
|
1992
|
-
const size_type n_pos = raw_pos -
|
2801
|
+
const size_type n_pos = raw_pos - this->priv_raw_begin();
|
1993
2802
|
this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
|
1994
2803
|
return iterator(this->m_holder.start() + n_pos);
|
1995
2804
|
}
|
@@ -1997,7 +2806,7 @@ class vector
|
|
1997
2806
|
|
1998
2807
|
template <class InsertionProxy>
|
1999
2808
|
iterator priv_forward_range_insert_at_end
|
2000
|
-
(const size_type n, const InsertionProxy insert_range_proxy,
|
2809
|
+
(const size_type n, const InsertionProxy insert_range_proxy, version_0)
|
2001
2810
|
{
|
2002
2811
|
//Check if we have enough memory or try to expand current memory
|
2003
2812
|
const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
|
@@ -2010,81 +2819,11 @@ class vector
|
|
2010
2819
|
return this->end();
|
2011
2820
|
}
|
2012
2821
|
|
2013
|
-
template <class InsertionProxy>
|
2014
|
-
iterator priv_forward_range_insert_at_end
|
2015
|
-
(const size_type n, const InsertionProxy insert_range_proxy, allocator_v1)
|
2016
|
-
{
|
2017
|
-
return this->priv_forward_range_insert(vector_iterator_get_ptr(this->cend()), n, insert_range_proxy, allocator_v1());
|
2018
|
-
}
|
2019
|
-
|
2020
|
-
template <class InsertionProxy>
|
2822
|
+
template <class InsertionProxy, class AllocVersion>
|
2021
2823
|
iterator priv_forward_range_insert_at_end
|
2022
|
-
(const size_type n, const InsertionProxy insert_range_proxy,
|
2023
|
-
{
|
2024
|
-
return this->priv_forward_range_insert(vector_iterator_get_ptr(this->cend()), n, insert_range_proxy, allocator_v2());
|
2025
|
-
}
|
2026
|
-
|
2027
|
-
//Absolutely experimental. This function might change, disappear or simply crash!
|
2028
|
-
template<class BiDirPosConstIt, class BiDirSkipConstIt, class BiDirValueIt>
|
2029
|
-
void priv_insert_ordered_at( size_type element_count, BiDirPosConstIt last_position_it
|
2030
|
-
, bool do_skip, BiDirSkipConstIt last_skip_it, BiDirValueIt last_value_it)
|
2824
|
+
(const size_type n, const InsertionProxy insert_range_proxy, AllocVersion)
|
2031
2825
|
{
|
2032
|
-
|
2033
|
-
this->reserve(old_size_pos + element_count);
|
2034
|
-
T* const begin_ptr = container_detail::to_raw_pointer(this->m_holder.start());
|
2035
|
-
size_type insertions_left = element_count;
|
2036
|
-
size_type next_pos = old_size_pos;
|
2037
|
-
size_type hole_size = element_count;
|
2038
|
-
|
2039
|
-
//Exception rollback. If any copy throws before the hole is filled, values
|
2040
|
-
//already inserted/copied at the end of the buffer will be destroyed.
|
2041
|
-
typename value_traits::ArrayDestructor past_hole_values_destroyer
|
2042
|
-
(begin_ptr + old_size_pos + element_count, this->m_holder.alloc(), size_type(0u));
|
2043
|
-
//Loop for each insertion backwards, first moving the elements after the insertion point,
|
2044
|
-
//then inserting the element.
|
2045
|
-
while(insertions_left){
|
2046
|
-
if(do_skip){
|
2047
|
-
size_type n = *(--last_skip_it);
|
2048
|
-
std::advance(last_value_it, -difference_type(n));
|
2049
|
-
}
|
2050
|
-
const size_type pos = static_cast<size_type>(*(--last_position_it));
|
2051
|
-
BOOST_ASSERT(pos <= old_size_pos);
|
2052
|
-
//If needed shift the range after the insertion point and the previous insertion point.
|
2053
|
-
//Function will take care if the shift crosses the size() boundary, using copy/move
|
2054
|
-
//or uninitialized copy/move if necessary.
|
2055
|
-
size_type new_hole_size = (pos != next_pos)
|
2056
|
-
? priv_insert_ordered_at_shift_range(pos, next_pos, this->size(), insertions_left)
|
2057
|
-
: hole_size
|
2058
|
-
;
|
2059
|
-
if(new_hole_size > 0){
|
2060
|
-
//The hole was reduced by priv_insert_ordered_at_shift_range so expand exception rollback range backwards
|
2061
|
-
past_hole_values_destroyer.increment_size_backwards(next_pos - pos);
|
2062
|
-
//Insert the new value in the hole
|
2063
|
-
allocator_traits_type::construct(this->m_holder.alloc(), begin_ptr + pos + insertions_left - 1, *(--last_value_it));
|
2064
|
-
--new_hole_size;
|
2065
|
-
if(new_hole_size == 0){
|
2066
|
-
//Hole was just filled, disable exception rollback and change vector size
|
2067
|
-
past_hole_values_destroyer.release();
|
2068
|
-
this->m_holder.m_size += element_count;
|
2069
|
-
}
|
2070
|
-
else{
|
2071
|
-
//The hole was reduced by the new insertion by one
|
2072
|
-
past_hole_values_destroyer.increment_size_backwards(size_type(1u));
|
2073
|
-
}
|
2074
|
-
}
|
2075
|
-
else{
|
2076
|
-
if(hole_size){
|
2077
|
-
//Hole was just filled by priv_insert_ordered_at_shift_range, disable exception rollback and change vector size
|
2078
|
-
past_hole_values_destroyer.release();
|
2079
|
-
this->m_holder.m_size += element_count;
|
2080
|
-
}
|
2081
|
-
//Insert the new value in the already constructed range
|
2082
|
-
begin_ptr[pos + insertions_left - 1] = *(--last_value_it);
|
2083
|
-
}
|
2084
|
-
--insertions_left;
|
2085
|
-
hole_size = new_hole_size;
|
2086
|
-
next_pos = pos;
|
2087
|
-
}
|
2826
|
+
return this->priv_forward_range_insert(this->back_ptr(), n, insert_range_proxy);
|
2088
2827
|
}
|
2089
2828
|
|
2090
2829
|
//Takes the range pointed by [first_pos, last_pos) and shifts it to the right
|
@@ -2100,28 +2839,28 @@ class vector
|
|
2100
2839
|
//
|
2101
2840
|
//Old situation:
|
2102
2841
|
// first_pos last_pos old_limit
|
2103
|
-
// | | |
|
2842
|
+
// | | |
|
2104
2843
|
// ____________V_______V__________________V_____________
|
2105
2844
|
//| prefix | range | suffix |raw_mem ~
|
2106
2845
|
//|____________|_______|__________________|_____________~
|
2107
2846
|
//
|
2108
|
-
//New situation in Case
|
2847
|
+
//New situation in Case A (hole_size == 0):
|
2109
2848
|
// range is moved through move assignments
|
2110
2849
|
//
|
2111
2850
|
// first_pos last_pos limit_pos
|
2112
|
-
// | | |
|
2851
|
+
// | | |
|
2113
2852
|
// ____________V_______V__________________V_____________
|
2114
2853
|
//| prefix' | | | range |suffix'|raw_mem ~
|
2115
2854
|
//|________________+______|___^___|_______|_____________~
|
2116
2855
|
// | |
|
2117
|
-
// |_>_>_>_>_>^
|
2856
|
+
// |_>_>_>_>_>^
|
2118
2857
|
//
|
2119
2858
|
//
|
2120
|
-
//New situation in Case B (hole_size
|
2859
|
+
//New situation in Case B (hole_size >= 0):
|
2121
2860
|
// range is moved through uninitialized moves
|
2122
2861
|
//
|
2123
2862
|
// first_pos last_pos limit_pos
|
2124
|
-
// | | |
|
2863
|
+
// | | |
|
2125
2864
|
// ____________V_______V__________________V________________
|
2126
2865
|
//| prefix' | | | [hole] | range |
|
2127
2866
|
//|_______________________________________|________|___^___|
|
@@ -2132,7 +2871,7 @@ class vector
|
|
2132
2871
|
// range is moved through move assignments and uninitialized moves
|
2133
2872
|
//
|
2134
2873
|
// first_pos last_pos limit_pos
|
2135
|
-
// | | |
|
2874
|
+
// | | |
|
2136
2875
|
// ____________V_______V__________________V___
|
2137
2876
|
//| prefix' | | | range |
|
2138
2877
|
//|___________________________________|___^___|
|
@@ -2144,22 +2883,22 @@ class vector
|
|
2144
2883
|
BOOST_ASSERT(first_pos <= last_pos);
|
2145
2884
|
BOOST_ASSERT(last_pos <= limit_pos);
|
2146
2885
|
//
|
2147
|
-
T* const begin_ptr =
|
2886
|
+
T* const begin_ptr = this->priv_raw_begin();
|
2148
2887
|
T* const first_ptr = begin_ptr + first_pos;
|
2149
2888
|
T* const last_ptr = begin_ptr + last_pos;
|
2150
2889
|
|
2151
2890
|
size_type hole_size = 0;
|
2152
|
-
//Case
|
2891
|
+
//Case A:
|
2153
2892
|
if((last_pos + shift_count) <= limit_pos){
|
2154
2893
|
//All move assigned
|
2155
|
-
boost::move_backward(first_ptr, last_ptr, last_ptr + shift_count);
|
2894
|
+
boost::container::move_backward(first_ptr, last_ptr, last_ptr + shift_count);
|
2156
2895
|
}
|
2157
2896
|
//Case B:
|
2158
2897
|
else if((first_pos + shift_count) >= limit_pos){
|
2159
2898
|
//All uninitialized_moved
|
2160
2899
|
::boost::container::uninitialized_move_alloc
|
2161
2900
|
(this->m_holder.alloc(), first_ptr, last_ptr, first_ptr + shift_count);
|
2162
|
-
hole_size =
|
2901
|
+
hole_size = first_pos + shift_count - limit_pos;
|
2163
2902
|
}
|
2164
2903
|
//Case C:
|
2165
2904
|
else{
|
@@ -2168,17 +2907,23 @@ class vector
|
|
2168
2907
|
T* const boundary_ptr = limit_ptr - shift_count;
|
2169
2908
|
::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), boundary_ptr, last_ptr, limit_ptr);
|
2170
2909
|
//The rest is move assigned
|
2171
|
-
boost::move_backward(first_ptr, boundary_ptr, limit_ptr);
|
2910
|
+
boost::container::move_backward(first_ptr, boundary_ptr, limit_ptr);
|
2172
2911
|
}
|
2173
2912
|
return hole_size;
|
2174
2913
|
}
|
2175
2914
|
|
2176
2915
|
private:
|
2916
|
+
T *priv_raw_begin() const
|
2917
|
+
{ return container_detail::to_raw_pointer(m_holder.start()); }
|
2918
|
+
|
2919
|
+
T* priv_raw_end() const
|
2920
|
+
{ return this->priv_raw_begin() + this->m_holder.m_size; }
|
2921
|
+
|
2177
2922
|
template <class InsertionProxy>
|
2178
2923
|
void priv_forward_range_insert_at_end_expand_forward(const size_type n, InsertionProxy insert_range_proxy)
|
2179
2924
|
{
|
2180
|
-
T* const old_finish =
|
2181
|
-
insert_range_proxy.uninitialized_copy_n_and_update(old_finish, n);
|
2925
|
+
T* const old_finish = this->priv_raw_end();
|
2926
|
+
insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
|
2182
2927
|
this->m_holder.m_size += n;
|
2183
2928
|
}
|
2184
2929
|
|
@@ -2186,13 +2931,13 @@ class vector
|
|
2186
2931
|
void priv_forward_range_insert_expand_forward(T* const pos, const size_type n, InsertionProxy insert_range_proxy)
|
2187
2932
|
{
|
2188
2933
|
//n can't be 0, because there is nothing to do in that case
|
2189
|
-
if(!n) return;
|
2934
|
+
if(BOOST_UNLIKELY(!n)) return;
|
2190
2935
|
//There is enough memory
|
2191
|
-
T* const old_finish =
|
2936
|
+
T* const old_finish = this->priv_raw_end();
|
2192
2937
|
const size_type elems_after = old_finish - pos;
|
2193
2938
|
|
2194
2939
|
if (!elems_after){
|
2195
|
-
insert_range_proxy.uninitialized_copy_n_and_update(old_finish, n);
|
2940
|
+
insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
|
2196
2941
|
this->m_holder.m_size += n;
|
2197
2942
|
}
|
2198
2943
|
else if (elems_after >= n){
|
@@ -2202,9 +2947,9 @@ class vector
|
|
2202
2947
|
(this->m_holder.alloc(), old_finish - n, old_finish, old_finish);
|
2203
2948
|
this->m_holder.m_size += n;
|
2204
2949
|
//Copy previous to last objects to the initialized end
|
2205
|
-
boost::move_backward(pos, old_finish - n, old_finish);
|
2950
|
+
boost::container::move_backward(pos, old_finish - n, old_finish);
|
2206
2951
|
//Insert new objects in the pos
|
2207
|
-
insert_range_proxy.copy_n_and_update(pos, n);
|
2952
|
+
insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n);
|
2208
2953
|
}
|
2209
2954
|
else {
|
2210
2955
|
//The new elements don't fit in the [pos, end()) range.
|
@@ -2213,9 +2958,9 @@ class vector
|
|
2213
2958
|
::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pos, old_finish, pos + n);
|
2214
2959
|
BOOST_TRY{
|
2215
2960
|
//Copy first new elements in pos (gap is still there)
|
2216
|
-
insert_range_proxy.copy_n_and_update(pos, elems_after);
|
2961
|
+
insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elems_after);
|
2217
2962
|
//Copy to the beginning of the unallocated zone the last new elements (the gap is closed).
|
2218
|
-
insert_range_proxy.uninitialized_copy_n_and_update(old_finish, n - elems_after);
|
2963
|
+
insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n - elems_after);
|
2219
2964
|
this->m_holder.m_size += n;
|
2220
2965
|
}
|
2221
2966
|
BOOST_CATCH(...){
|
@@ -2234,21 +2979,22 @@ class vector
|
|
2234
2979
|
T *new_finish = new_start;
|
2235
2980
|
T *old_finish;
|
2236
2981
|
//Anti-exception rollbacks
|
2237
|
-
typename value_traits::ArrayDeallocator
|
2238
|
-
typename value_traits::ArrayDestructor
|
2982
|
+
typename value_traits::ArrayDeallocator new_buffer_deallocator(new_start, this->m_holder.alloc(), new_cap);
|
2983
|
+
typename value_traits::ArrayDestructor new_values_destroyer(new_start, this->m_holder.alloc(), 0u);
|
2239
2984
|
|
2240
2985
|
//Initialize with [begin(), pos) old buffer
|
2241
2986
|
//the start of the new buffer
|
2242
|
-
T *old_buffer =
|
2987
|
+
T * const old_buffer = this->priv_raw_begin();
|
2243
2988
|
if(old_buffer){
|
2244
2989
|
new_finish = ::boost::container::uninitialized_move_alloc
|
2245
|
-
(this->m_holder.alloc(),
|
2246
|
-
|
2990
|
+
(this->m_holder.alloc(), this->priv_raw_begin(), pos, old_finish = new_finish);
|
2991
|
+
new_values_destroyer.increment_size(new_finish - old_finish);
|
2247
2992
|
}
|
2248
2993
|
//Initialize new objects, starting from previous point
|
2249
|
-
|
2994
|
+
old_finish = new_finish;
|
2995
|
+
insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
|
2250
2996
|
new_finish += n;
|
2251
|
-
|
2997
|
+
new_values_destroyer.increment_size(new_finish - old_finish);
|
2252
2998
|
//Initialize from the rest of the old buffer,
|
2253
2999
|
//starting from previous point
|
2254
3000
|
if(old_buffer){
|
@@ -2264,8 +3010,8 @@ class vector
|
|
2264
3010
|
this->m_holder.m_size = new_finish - new_start;
|
2265
3011
|
this->m_holder.capacity(new_cap);
|
2266
3012
|
//All construction successful, disable rollbacks
|
2267
|
-
|
2268
|
-
|
3013
|
+
new_values_destroyer.release();
|
3014
|
+
new_buffer_deallocator.release();
|
2269
3015
|
}
|
2270
3016
|
|
2271
3017
|
template <class InsertionProxy>
|
@@ -2275,9 +3021,9 @@ class vector
|
|
2275
3021
|
{
|
2276
3022
|
//n can be zero to just expand capacity
|
2277
3023
|
//Backup old data
|
2278
|
-
T* const old_start =
|
2279
|
-
T* const old_finish = old_start + this->m_holder.m_size;
|
3024
|
+
T* const old_start = this->priv_raw_begin();
|
2280
3025
|
const size_type old_size = this->m_holder.m_size;
|
3026
|
+
T* const old_finish = old_start + old_size;
|
2281
3027
|
|
2282
3028
|
//We can have 8 possibilities:
|
2283
3029
|
const size_type elemsbefore = static_cast<size_type>(pos - old_start);
|
@@ -2291,17 +3037,18 @@ class vector
|
|
2291
3037
|
|
2292
3038
|
//If anything goes wrong, this object will destroy
|
2293
3039
|
//all the old objects to fulfill previous vector state
|
2294
|
-
typename value_traits::
|
3040
|
+
typename value_traits::ArrayDestructor old_values_destroyer(old_start, this->m_holder.alloc(), old_size);
|
2295
3041
|
//Check if s_before is big enough to hold the beginning of old data + new data
|
2296
3042
|
if(s_before >= before_plus_new){
|
2297
3043
|
//Copy first old values before pos, after that the new objects
|
2298
|
-
T *const new_elem_pos =
|
3044
|
+
T *const new_elem_pos =
|
3045
|
+
::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), old_start, pos, new_start);
|
2299
3046
|
this->m_holder.m_size = elemsbefore;
|
2300
|
-
insert_range_proxy.uninitialized_copy_n_and_update(new_elem_pos, n);
|
2301
|
-
this->m_holder.m_size
|
3047
|
+
insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_elem_pos, n);
|
3048
|
+
this->m_holder.m_size = before_plus_new;
|
3049
|
+
const size_type new_size = old_size + n;
|
2302
3050
|
//Check if s_before is so big that even copying the old data + new data
|
2303
3051
|
//there is a gap between the new data and the old data
|
2304
|
-
const size_type new_size = old_size + n;
|
2305
3052
|
if(s_before >= new_size){
|
2306
3053
|
//Old situation:
|
2307
3054
|
// _________________________________________________________
|
@@ -2314,10 +3061,12 @@ class vector
|
|
2314
3061
|
//|___________|__________|_________|________________________|
|
2315
3062
|
//
|
2316
3063
|
//Now initialize the rest of memory with the last old values
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
3064
|
+
if(before_plus_new != new_size){ //Special case to avoid operations in back insertion
|
3065
|
+
::boost::container::uninitialized_move_alloc
|
3066
|
+
(this->m_holder.alloc(), pos, old_finish, new_start + before_plus_new);
|
3067
|
+
//All new elements correctly constructed, avoid new element destruction
|
3068
|
+
this->m_holder.m_size = new_size;
|
3069
|
+
}
|
2321
3070
|
//Old values destroyed automatically with "old_values_destroyer"
|
2322
3071
|
//when "old_values_destroyer" goes out of scope unless the have trivial
|
2323
3072
|
//destructor after move.
|
@@ -2339,22 +3088,28 @@ class vector
|
|
2339
3088
|
//Now initialize the rest of memory with the last old values
|
2340
3089
|
//All new elements correctly constructed, avoid new element destruction
|
2341
3090
|
const size_type raw_gap = s_before - before_plus_new;
|
2342
|
-
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
|
2355
|
-
|
2356
|
-
|
2357
|
-
|
3091
|
+
if(!value_traits::trivial_dctr){
|
3092
|
+
//Now initialize the rest of s_before memory with the
|
3093
|
+
//first of elements after new values
|
3094
|
+
::boost::container::uninitialized_move_alloc_n
|
3095
|
+
(this->m_holder.alloc(), pos, raw_gap, new_start + before_plus_new);
|
3096
|
+
//Now we have a contiguous buffer so program trailing element destruction
|
3097
|
+
//and update size to the final size.
|
3098
|
+
old_values_destroyer.shrink_forward(new_size-s_before);
|
3099
|
+
this->m_holder.m_size = new_size;
|
3100
|
+
//Now move remaining last objects in the old buffer begin
|
3101
|
+
::boost::container::move(pos + raw_gap, old_finish, old_start);
|
3102
|
+
//Once moved, avoid calling the destructors if trivial after move
|
3103
|
+
if(value_traits::trivial_dctr_after_move){
|
3104
|
+
old_values_destroyer.release();
|
3105
|
+
}
|
3106
|
+
}
|
3107
|
+
else{ //If trivial destructor, we can uninitialized copy + copy in a single uninitialized copy
|
3108
|
+
::boost::container::uninitialized_move_alloc_n
|
3109
|
+
(this->m_holder.alloc(), pos, old_finish - pos, new_start + before_plus_new);
|
3110
|
+
this->m_holder.m_size = new_size;
|
3111
|
+
old_values_destroyer.release();
|
3112
|
+
}
|
2358
3113
|
}
|
2359
3114
|
}
|
2360
3115
|
else{
|
@@ -2409,26 +3164,32 @@ class vector
|
|
2409
3164
|
::boost::container::uninitialized_move_alloc_n
|
2410
3165
|
(this->m_holder.alloc(), old_start, s_before, new_start);
|
2411
3166
|
//The buffer is all constructed until old_end,
|
2412
|
-
//
|
2413
|
-
|
2414
|
-
|
2415
|
-
//Now copy the second part of old_begin overwriting itself
|
2416
|
-
T *const next = ::boost::move(old_start + s_before, pos, old_start);
|
3167
|
+
//so program trailing destruction and assign final size
|
3168
|
+
//if !do_after, s_before+n otherwise.
|
3169
|
+
size_type new_1st_range;
|
2417
3170
|
if(do_after){
|
2418
|
-
|
2419
|
-
|
3171
|
+
new_1st_range = s_before;
|
3172
|
+
//release destroyer and update size
|
3173
|
+
old_values_destroyer.release();
|
2420
3174
|
}
|
2421
3175
|
else{
|
2422
|
-
|
2423
|
-
|
3176
|
+
new_1st_range = n;
|
3177
|
+
if(value_traits::trivial_dctr_after_move)
|
3178
|
+
old_values_destroyer.release();
|
3179
|
+
else{
|
3180
|
+
old_values_destroyer.shrink_forward(old_size - (s_before - n));
|
3181
|
+
}
|
3182
|
+
}
|
3183
|
+
this->m_holder.m_size = old_size + new_1st_range;
|
3184
|
+
//Now copy the second part of old_begin overwriting itself
|
3185
|
+
T *const next = ::boost::container::move(old_start + s_before, pos, old_start);
|
3186
|
+
//Now copy the new_beg elements
|
3187
|
+
insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), next, new_1st_range);
|
3188
|
+
|
3189
|
+
//If there is no after work and the last old part needs to be moved to front, do it
|
3190
|
+
if(!do_after && (n != s_before)){
|
2424
3191
|
//Now displace old_end elements
|
2425
|
-
|
2426
|
-
//Destroy remaining moved elements from old_end except if
|
2427
|
-
//they have trivial destructor after being moved
|
2428
|
-
const size_type n_destroy = s_before - n;
|
2429
|
-
if(!value_traits::trivial_dctr_after_move)
|
2430
|
-
boost::container::destroy_alloc_n(this->get_stored_allocator(), move_end, n_destroy);
|
2431
|
-
this->m_holder.m_size -= n_destroy;
|
3192
|
+
::boost::container::move(pos, old_finish, next + new_1st_range);
|
2432
3193
|
}
|
2433
3194
|
}
|
2434
3195
|
else {
|
@@ -2462,7 +3223,7 @@ class vector
|
|
2462
3223
|
(this->m_holder.alloc(), old_start, pos, new_start);
|
2463
3224
|
this->m_holder.m_size = elemsbefore;
|
2464
3225
|
const size_type mid_n = s_before - elemsbefore;
|
2465
|
-
insert_range_proxy.uninitialized_copy_n_and_update(new_pos, mid_n);
|
3226
|
+
insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_pos, mid_n);
|
2466
3227
|
//The buffer is all constructed until old_end,
|
2467
3228
|
//release destroyer
|
2468
3229
|
this->m_holder.m_size = old_size + s_before;
|
@@ -2470,15 +3231,15 @@ class vector
|
|
2470
3231
|
|
2471
3232
|
if(do_after){
|
2472
3233
|
//Copy new_beg part
|
2473
|
-
insert_range_proxy.copy_n_and_update(old_start, elemsbefore);
|
3234
|
+
insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, elemsbefore);
|
2474
3235
|
}
|
2475
3236
|
else{
|
2476
3237
|
//Copy all new elements
|
2477
3238
|
const size_type rest_new = n - mid_n;
|
2478
|
-
insert_range_proxy.copy_n_and_update(old_start, rest_new);
|
2479
|
-
T* move_start = old_start + rest_new;
|
3239
|
+
insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, rest_new);
|
3240
|
+
T* const move_start = old_start + rest_new;
|
2480
3241
|
//Displace old_end
|
2481
|
-
T* move_end = ::boost::move(pos, old_finish, move_start);
|
3242
|
+
T* const move_end = ::boost::container::move(pos, old_finish, move_start);
|
2482
3243
|
//Destroy remaining moved elements from old_end except if they
|
2483
3244
|
//have trivial destructor after being moved
|
2484
3245
|
size_type n_destroy = s_before - n;
|
@@ -2530,10 +3291,10 @@ class vector
|
|
2530
3291
|
(this->m_holder.alloc(), finish_n, old_finish, old_finish);
|
2531
3292
|
this->m_holder.m_size += n_after;
|
2532
3293
|
//Displace the rest of old_end to the new position
|
2533
|
-
boost::move_backward(pos, finish_n, old_finish);
|
3294
|
+
boost::container::move_backward(pos, finish_n, old_finish);
|
2534
3295
|
//Now overwrite with new_end
|
2535
3296
|
//The new_end part is [first + (n - n_after), last)
|
2536
|
-
insert_range_proxy.copy_n_and_update(pos, n_after);
|
3297
|
+
insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n_after);
|
2537
3298
|
}
|
2538
3299
|
else {
|
2539
3300
|
//The raw_mem from end will divide new_end part
|
@@ -2556,36 +3317,21 @@ class vector
|
|
2556
3317
|
::boost::container::uninitialized_move_alloc
|
2557
3318
|
(this->m_holder.alloc(), pos, old_finish, old_finish + mid_last_dist);
|
2558
3319
|
|
2559
|
-
|
2560
|
-
|
2561
|
-
insert_range_proxy.copy_n_and_update(pos, elemsafter);
|
2562
|
-
//Copy the rest to the uninitialized zone filling the gap
|
2563
|
-
insert_range_proxy.uninitialized_copy_n_and_update(old_finish, mid_last_dist);
|
2564
|
-
this->m_holder.m_size += n_after;
|
2565
|
-
}
|
2566
|
-
BOOST_CATCH(...){
|
2567
|
-
boost::container::destroy_alloc_n(this->get_stored_allocator(), pos, mid_last_dist);
|
2568
|
-
BOOST_RETHROW
|
2569
|
-
}
|
2570
|
-
BOOST_CATCH_END
|
2571
|
-
/*
|
2572
|
-
size_type mid_last_dist = n_after - elemsafter;
|
2573
|
-
//First initialize data in raw memory
|
3320
|
+
typename value_traits::ArrayDestructor old_end_destroyer
|
3321
|
+
(old_finish + mid_last_dist, this->m_holder.alloc(), old_finish - pos);
|
2574
3322
|
|
2575
|
-
//
|
2576
|
-
insert_range_proxy.
|
2577
|
-
|
2578
|
-
|
2579
|
-
|
2580
|
-
|
2581
|
-
//Now copy the part of new_end over constructed elements
|
2582
|
-
insert_range_proxy.copy_remaining_to(pos);*/
|
3323
|
+
//Copy the first part to the already constructed old_end zone
|
3324
|
+
insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elemsafter);
|
3325
|
+
//Copy the rest to the uninitialized zone filling the gap
|
3326
|
+
insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, mid_last_dist);
|
3327
|
+
this->m_holder.m_size += n_after;
|
3328
|
+
old_end_destroyer.release();
|
2583
3329
|
}
|
2584
3330
|
}
|
2585
3331
|
}
|
2586
3332
|
}
|
2587
3333
|
|
2588
|
-
void
|
3334
|
+
void priv_throw_if_out_of_range(size_type n) const
|
2589
3335
|
{
|
2590
3336
|
//If n is out of range, throw an out_of_range exception
|
2591
3337
|
if (n >= this->size()){
|
@@ -2593,6 +3339,16 @@ class vector
|
|
2593
3339
|
}
|
2594
3340
|
}
|
2595
3341
|
|
3342
|
+
bool priv_in_range(const_iterator pos) const
|
3343
|
+
{
|
3344
|
+
return (this->begin() <= pos) && (pos < this->end());
|
3345
|
+
}
|
3346
|
+
|
3347
|
+
bool priv_in_range_or_end(const_iterator pos) const
|
3348
|
+
{
|
3349
|
+
return (this->begin() <= pos) && (pos <= this->end());
|
3350
|
+
}
|
3351
|
+
|
2596
3352
|
#ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
|
2597
3353
|
public:
|
2598
3354
|
unsigned int num_expand_fwd;
|
@@ -2602,70 +3358,29 @@ class vector
|
|
2602
3358
|
void reset_alloc_stats()
|
2603
3359
|
{ num_expand_fwd = num_expand_bwd = num_alloc = 0, num_shrink = 0; }
|
2604
3360
|
#endif
|
2605
|
-
|
3361
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
2606
3362
|
};
|
2607
3363
|
|
2608
|
-
|
2609
|
-
inline bool
|
2610
|
-
operator==(const vector<T, Allocator>& x, const vector<T, Allocator>& y)
|
2611
|
-
{
|
2612
|
-
//Check first size and each element if needed
|
2613
|
-
return x.size() == y.size() && std::equal(x.begin(), x.end(), y.begin());
|
2614
|
-
}
|
2615
|
-
|
2616
|
-
template <class T, class Allocator>
|
2617
|
-
inline bool
|
2618
|
-
operator!=(const vector<T, Allocator>& x, const vector<T, Allocator>& y)
|
2619
|
-
{
|
2620
|
-
//Check first size and each element if needed
|
2621
|
-
return x.size() != y.size() || !std::equal(x.begin(), x.end(), y.begin());
|
2622
|
-
}
|
2623
|
-
|
2624
|
-
template <class T, class Allocator>
|
2625
|
-
inline bool
|
2626
|
-
operator<(const vector<T, Allocator>& x, const vector<T, Allocator>& y)
|
2627
|
-
{
|
2628
|
-
return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());
|
2629
|
-
}
|
2630
|
-
|
2631
|
-
template <class T, class Allocator>
|
2632
|
-
inline void swap(vector<T, Allocator>& x, vector<T, Allocator>& y)
|
2633
|
-
{ x.swap(y); }
|
2634
|
-
|
2635
|
-
}}
|
3364
|
+
}} //namespace boost::container
|
2636
3365
|
|
2637
|
-
|
3366
|
+
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
2638
3367
|
|
2639
3368
|
namespace boost {
|
2640
3369
|
|
2641
|
-
|
2642
3370
|
//!has_trivial_destructor_after_move<> == true_type
|
2643
3371
|
//!specialization for optimizations
|
2644
3372
|
template <class T, class Allocator>
|
2645
3373
|
struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator> >
|
2646
|
-
|
2647
|
-
|
2648
|
-
|
3374
|
+
{
|
3375
|
+
typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
|
3376
|
+
static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
|
3377
|
+
::boost::has_trivial_destructor_after_move<pointer>::value;
|
3378
|
+
};
|
2649
3379
|
|
2650
3380
|
}
|
2651
3381
|
|
2652
|
-
//#
|
2653
|
-
|
2654
|
-
#ifdef BOOST_CONTAINER_PUT_SWAP_OVERLOAD_IN_NAMESPACE_STD
|
2655
|
-
|
2656
|
-
namespace std {
|
2657
|
-
|
2658
|
-
template <class T, class Allocator>
|
2659
|
-
inline void swap(boost::container::vector<T, Allocator>& x, boost::container::vector<T, Allocator>& y)
|
2660
|
-
{ x.swap(y); }
|
2661
|
-
|
2662
|
-
} //namespace std {
|
2663
|
-
|
2664
|
-
#endif
|
2665
|
-
|
2666
|
-
/// @endcond
|
3382
|
+
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
|
2667
3383
|
|
2668
3384
|
#include <boost/container/detail/config_end.hpp>
|
2669
3385
|
|
2670
3386
|
#endif // #ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
|
2671
|
-
|