passenger 6.0.1 → 6.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +145 -18
- data/CONTRIBUTORS +6 -0
- data/bin/passenger-install-nginx-module +1 -1
- data/bin/passenger-status +15 -0
- data/build/misc.rb +3 -1
- data/build/support/vendor/cxxcodebuilder/lib/cxxcodebuilder/builder.rb +56 -3
- data/dev/copy_boost_headers +1 -0
- data/package.json +1 -1
- data/passenger.gemspec +9 -1
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.css +0 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/bootstrap.js +0 -0
- data/resources/templates/error_renderer/with_details/src/bootstrap/config.json +0 -0
- data/resources/templates/standalone/http.erb +2 -0
- data/resources/templates/standalone/server.erb +1 -0
- data/src/agent/Core/ApplicationPool/Group/ProcessListManagement.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Group/StateInspection.cpp +1 -0
- data/src/agent/Core/ApplicationPool/Options.h +10 -0
- data/src/agent/Core/ApplicationPool/Pool/GarbageCollection.cpp +1 -1
- data/src/agent/Core/ApplicationPool/Pool/StateInspection.cpp +1 -1
- data/src/agent/Core/Config.h +14 -1
- data/src/agent/Core/Controller.h +1 -0
- data/src/agent/Core/Controller/Config.h +5 -1
- data/src/agent/Core/Controller/ForwardResponse.cpp +13 -0
- data/src/agent/Core/Controller/InitRequest.cpp +3 -0
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +1 -0
- data/src/agent/Core/CoreMain.cpp +2 -1
- data/src/agent/Core/OptionParser.h +3 -0
- data/src/agent/Core/SpawningKit/Context.h +1 -0
- data/src/agent/Core/SpawningKit/Handshake/Prepare.h +1 -1
- data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +5 -2
- data/src/agent/TempDirToucher/TempDirToucherMain.cpp +2 -0
- data/src/agent/Watchdog/Config.h +15 -1
- data/src/agent/Watchdog/WatchdogMain.cpp +7 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +10 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +10 -0
- data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +30 -0
- data/src/apache2_module/Hooks.cpp +6 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedManifestGeneration.cpp +20 -0
- data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +24 -0
- data/src/cxx_supportlib/Constants.h +2 -1
- data/src/cxx_supportlib/LoggingKit/Config.h +2 -0
- data/src/cxx_supportlib/LoggingKit/Implementation.cpp +15 -9
- data/src/cxx_supportlib/ServerKit/HttpChunkedBodyParser.h +1 -1
- data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +20 -19
- data/src/cxx_supportlib/WebSocketCommandReverseServer.h +11 -7
- data/src/cxx_supportlib/oxt/system_calls.cpp +10 -10
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/finder.hpp +0 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/buffer.hpp +46 -37
- data/src/cxx_supportlib/vendor-modified/boost/asio/connect.hpp +16 -15
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/config.hpp +45 -26
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/future.hpp +33 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/impl/socket_ops.ipp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/is_buffer_sequence.hpp +38 -14
- data/src/cxx_supportlib/vendor-modified/boost/asio/detail/timer_queue.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/io_context.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/read_until.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/impl/use_future.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/bad_address_cast.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver.hpp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/ip/basic_resolver_results.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/packaged_task.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/read.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_at.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/asio/read_until.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/context_base.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/impl/context.ipp +50 -5
- data/src/cxx_supportlib/vendor-modified/boost/asio/ssl/stream.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/thread_pool.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/use_future.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/asio/version.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/asio/write.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/asio/write_at.hpp +5 -3
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +13 -12
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/chrono.hpp +10 -10
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp +34 -34
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/mac/thread_clock.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/chrono.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp +27 -27
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/thread_clock.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/system.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/chrono/io/time_point_io.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/allocators.hpp +89 -0
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/base.hpp +83 -74
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/details.hpp +21 -33
- data/src/cxx_supportlib/vendor-modified/boost/circular_buffer/space_optimized.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/concept/assert.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/concept/detail/general.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/concept/detail/has_constraints.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/concept/usage.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/concept_check.hpp +19 -19
- data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +8 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +5 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +6 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/comeau.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +368 -52
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +6 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/greenhills.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/kai.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +9 -4
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp_zos.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/detail/select_compiler_config.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/detail/suffix.hpp +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +14 -4
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +262 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool.hpp +22 -19
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/adaptive_node_pool_impl.hpp +833 -459
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +24 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/allocator_version_traits.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +61 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +33 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +132 -41
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterator.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/math_functions.hpp +54 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +58 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/multiallocation_chain.hpp +28 -23
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +167 -115
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/std_fwd.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/thread_mutex.hpp +181 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +167 -29
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/type_traits.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +18 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +389 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +262 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +52 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +364 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/monotonic_buffer_resource.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/resource_adaptor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/synchronized_pool_resource.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +286 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +56 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +43 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +100 -31
- data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +126 -69
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +75 -51
- data/src/cxx_supportlib/vendor-modified/boost/core/empty_value.hpp +136 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/exchange.hpp +49 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/explicit_operator_bool.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +101 -130
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test_trait.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/core/noncopyable.hpp +16 -1
- data/src/cxx_supportlib/vendor-modified/boost/core/quick_exit.hpp +59 -0
- data/src/cxx_supportlib/vendor-modified/boost/core/ref.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/core/swap.hpp +9 -2
- data/src/cxx_supportlib/vendor-modified/boost/core/typeinfo.hpp +26 -10
- data/src/cxx_supportlib/vendor-modified/boost/date_time/compiler_config.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/detail/basic_pointerbuf.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/detail/indirect_traits.hpp +38 -47
- data/src/cxx_supportlib/vendor-modified/boost/detail/lcast_precision.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/detail/reference_content.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +62 -58
- data/src/cxx_supportlib/vendor-modified/boost/function.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +29 -29
- data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +38 -40
- data/src/cxx_supportlib/vendor-modified/boost/integer/common_factor_rt.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +44 -44
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +39 -39
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +15 -15
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/derivation_value_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +14 -14
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/avltree_node.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_node.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/node_cloner_disposer.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/rbtree_node.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/simple_disposers.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_node.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_node.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +33 -14
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +12 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +39 -39
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +61 -61
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +66 -66
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +54 -54
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +6 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/iterator/advance.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/iterator/distance.hpp +65 -0
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/bad_lexical_cast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical.hpp +23 -23
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/inf_nan.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/is_character.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_char_constants.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/lcast_unsigned_converters.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/widest_char.hpp +5 -2
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +18 -13
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/cregex.cpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/libs/system/src/error_code.cpp +16 -5
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/future.cpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +14 -8
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/tss_null.cpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/detail/fp_traits.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +29 -6
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/mpl/assert.hpp +23 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/experimental_traits.hpp +9 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +10 -11
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +20 -1
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +211 -101
- data/src/cxx_supportlib/vendor-modified/boost/parameter/python.hpp +5 -6
- data/src/cxx_supportlib/vendor-modified/boost/pool/detail/mutex.hpp +119 -25
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture.h +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/arm.h +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/architecture/ptx.h +44 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler.h +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/compaq.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/nvcc.h +73 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/detail/endian_compat.h +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/language.h +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/language/cuda.h +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/make.h +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +6 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/other/endian.h +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +17 -8
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/stringize.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/wstringize.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/gray_coded_qrng.hpp +166 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/niederreiter_base2_table.hpp +513 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/qrng_base.hpp +291 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/detail/sobol_table.hpp +4106 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/faure.hpp +367 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/niederreiter_base2.hpp +360 -0
- data/src/cxx_supportlib/vendor-modified/boost/random/sobol.hpp +237 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/as_literal.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/begin.hpp +13 -5
- data/src/cxx_supportlib/vendor-modified/boost/range/concepts.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/range/detail/common.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/range/detail/implementation_help.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/range/distance.hpp +11 -5
- data/src/cxx_supportlib/vendor-modified/boost/range/end.hpp +14 -6
- data/src/cxx_supportlib/vendor-modified/boost/range/has_range_iterator.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/ratio/config.hpp +6 -2
- data/src/cxx_supportlib/vendor-modified/boost/rational.hpp +55 -37
- data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +11 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex.hpp +7 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +5 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +0 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +15 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_results.hpp +12 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +7 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +7 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +6 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +0 -5
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_iterator.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_raw_buffer.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_split.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_token_iterator.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +12 -11
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +7 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_iterator.hpp +1 -9
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/u32regex_token_iterator.hpp +2 -10
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +60 -115
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/local_counted_base.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_aix.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_nt.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_pt.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_solaris.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_spin.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_sync.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/yield_k.hpp +14 -8
- data/src/cxx_supportlib/vendor-modified/boost/system/config.hpp +4 -24
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/config.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/generic_category.hpp +101 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/std_interoperability.hpp +141 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/system_category_posix.hpp +132 -0
- data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +775 -588
- data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +6 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/move.hpp +13 -6
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/nullary_function.hpp +8 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread_safety.hpp +160 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/tss_hooks.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/basic_thread_pool.hpp +24 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/lock_guard.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/lockable_traits.hpp +31 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/mutex.hpp +8 -53
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/pthread_mutex_scoped_lock.hpp +73 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/recursive_mutex.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +14 -9
- data/src/cxx_supportlib/vendor-modified/boost/thread/xtime.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/throw_exception.hpp +9 -8
- data/src/cxx_supportlib/vendor-modified/boost/token_functions.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +21 -19
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_arithmetic_type.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/config.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/detector.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_postfix_operator.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/has_prefix_operator.hpp +72 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_cxx_03.hpp +108 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_cxx_11.hpp +501 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_function_msvc10_fix.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_likely_lambda.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp +117 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp +557 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp +43 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detected.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detected_or.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/enable_if.hpp +37 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_dereference.hpp +344 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_minus_assign.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_plus_assign.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_post_decrement.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_post_increment.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_pre_decrement.hpp +21 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_pre_increment.hpp +22 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_assign.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_constructor.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/integral_constant.hpp +5 -15
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/intrinsics.hpp +16 -6
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_complete.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_copy_assignable.hpp +3 -4
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_copy_constructible.hpp +4 -6
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_detected.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_detected_convertible.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_detected_exact.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_final.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_function.hpp +4 -79
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_member_function_pointer.hpp +3 -97
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_noncopyable.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_rvalue_reference.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +104 -63
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_void.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/nonesuch.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/typeof/constant.hpp +26 -0
- data/src/cxx_supportlib/vendor-modified/boost/typeof/dmc/typeof_impl.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode.hpp +0 -3
- data/src/cxx_supportlib/vendor-modified/boost/typeof/encode_decode_params.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/typeof/int_encoding.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/modifiers.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/msvc/typeof_impl.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/typeof/native.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/typeof/pointers_data_members.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_functions_iterate.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/typeof/register_mem_functions.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/typeof/template_encoding.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/typeof/template_template_param.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/typeof/type_encoding.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/typeof/typeof_impl.hpp +16 -16
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector100.hpp +201 -201
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector150.hpp +301 -301
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector200.hpp +401 -401
- data/src/cxx_supportlib/vendor-modified/boost/typeof/vector50.hpp +101 -101
- data/src/cxx_supportlib/vendor-modified/boost/utility/detail/minstd_rand.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_view.hpp +26 -6
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/helper-scripts/prespawn +1 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedDefinitions.c +40 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.c +26 -0
- data/src/nginx_module/ConfigGeneral/AutoGeneratedSetterFuncs.c +48 -0
- data/src/nginx_module/Configuration.c +6 -2
- data/src/nginx_module/ContentHandler.c +5 -1
- data/src/nginx_module/LocationConfig/AutoGeneratedCreateFunction.c +15 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedHeaderSerialization.c +15 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedManifestGeneration.c +28 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedMergeFunction.c +6 -0
- data/src/nginx_module/LocationConfig/AutoGeneratedStruct.h +11 -0
- data/src/nginx_module/MainConfig/AutoGeneratedCreateFunction.c +11 -0
- data/src/nginx_module/MainConfig/AutoGeneratedManifestGeneration.c +23 -0
- data/src/nginx_module/MainConfig/AutoGeneratedStruct.h +8 -0
- data/src/nginx_module/ngx_http_passenger_module.c +2 -0
- data/src/nodejs_supportlib/vendor-copy/winston/lib/winston/logger.js +0 -0
- data/src/ruby_native_extension/extconf.rb +7 -0
- data/src/ruby_supportlib/phusion_passenger.rb +7 -7
- data/src/ruby_supportlib/phusion_passenger/admin_tools/instance_registry.rb +8 -0
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +23 -0
- data/src/ruby_supportlib/phusion_passenger/constants.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb +1 -3
- data/src/ruby_supportlib/phusion_passenger/nginx/config_options.rb +37 -0
- data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb +10 -0
- data/src/ruby_supportlib/phusion_passenger/request_handler.rb +2 -2
- data/src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb +5 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/config_options_list.rb +11 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/builtin_engine.rb +3 -0
- data/src/ruby_supportlib/phusion_passenger/standalone/start_command/nginx_engine.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/utils/tee_input.rb +6 -0
- data/src/ruby_supportlib/phusion_passenger/utils/unseekable_socket.rb +15 -11
- metadata +42 -8
- data/src/cxx_supportlib/vendor-modified/boost/call_traits.hpp +0 -20
- data/src/cxx_supportlib/vendor-modified/boost/detail/call_traits.hpp +0 -172
- data/src/cxx_supportlib/vendor-modified/boost/detail/no_exceptions_support.hpp +0 -17
- data/src/cxx_supportlib/vendor-modified/boost/system/detail/error_code.ipp +0 -496
data/src/cxx_supportlib/vendor-modified/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
CHANGED
@@ -73,17 +73,17 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now(
|
|
73
73
|
clock_t c = ::times( &tm );
|
74
74
|
if ( c == clock_t(-1) ) // error
|
75
75
|
{
|
76
|
-
if (
|
76
|
+
if (::boost::chrono::is_throws(ec))
|
77
77
|
{
|
78
78
|
boost::throw_exception(
|
79
79
|
system::system_error(
|
80
80
|
errno,
|
81
|
-
|
81
|
+
::boost::system::system_category(),
|
82
82
|
"chrono::process_real_cpu_clock" ));
|
83
83
|
}
|
84
84
|
else
|
85
85
|
{
|
86
|
-
ec.assign( errno,
|
86
|
+
ec.assign( errno, ::boost::system::system_category() );
|
87
87
|
return time_point();
|
88
88
|
}
|
89
89
|
}
|
@@ -91,7 +91,7 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now(
|
|
91
91
|
{
|
92
92
|
if ( chrono_detail::tick_factor() != -1 )
|
93
93
|
{
|
94
|
-
if (
|
94
|
+
if (!::boost::chrono::is_throws(ec))
|
95
95
|
{
|
96
96
|
ec.clear();
|
97
97
|
}
|
@@ -100,17 +100,17 @@ process_real_cpu_clock::time_point process_real_cpu_clock::now(
|
|
100
100
|
}
|
101
101
|
else
|
102
102
|
{
|
103
|
-
if (
|
103
|
+
if (::boost::chrono::is_throws(ec))
|
104
104
|
{
|
105
105
|
boost::throw_exception(
|
106
106
|
system::system_error(
|
107
107
|
errno,
|
108
|
-
|
108
|
+
::boost::system::system_category(),
|
109
109
|
"chrono::process_real_cpu_clock" ));
|
110
110
|
}
|
111
111
|
else
|
112
112
|
{
|
113
|
-
ec.assign( errno,
|
113
|
+
ec.assign( errno, ::boost::system::system_category() );
|
114
114
|
return time_point();
|
115
115
|
}
|
116
116
|
}
|
@@ -149,17 +149,17 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
|
|
149
149
|
clock_t c = ::times( &tm );
|
150
150
|
if ( c == clock_t(-1) ) // error
|
151
151
|
{
|
152
|
-
if (
|
152
|
+
if (::boost::chrono::is_throws(ec))
|
153
153
|
{
|
154
154
|
boost::throw_exception(
|
155
155
|
system::system_error(
|
156
156
|
errno,
|
157
|
-
|
157
|
+
::boost::system::system_category(),
|
158
158
|
"chrono::process_user_cpu_clock" ));
|
159
159
|
}
|
160
160
|
else
|
161
161
|
{
|
162
|
-
ec.assign( errno,
|
162
|
+
ec.assign( errno, ::boost::system::system_category() );
|
163
163
|
return time_point();
|
164
164
|
}
|
165
165
|
}
|
@@ -167,7 +167,7 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
|
|
167
167
|
{
|
168
168
|
if ( chrono_detail::tick_factor() != -1 )
|
169
169
|
{
|
170
|
-
if (
|
170
|
+
if (!::boost::chrono::is_throws(ec))
|
171
171
|
{
|
172
172
|
ec.clear();
|
173
173
|
}
|
@@ -176,17 +176,17 @@ process_user_cpu_clock::time_point process_user_cpu_clock::now(
|
|
176
176
|
}
|
177
177
|
else
|
178
178
|
{
|
179
|
-
if (
|
179
|
+
if (::boost::chrono::is_throws(ec))
|
180
180
|
{
|
181
181
|
boost::throw_exception(
|
182
182
|
system::system_error(
|
183
183
|
errno,
|
184
|
-
|
184
|
+
::boost::system::system_category(),
|
185
185
|
"chrono::process_user_cpu_clock" ));
|
186
186
|
}
|
187
187
|
else
|
188
188
|
{
|
189
|
-
ec.assign( errno,
|
189
|
+
ec.assign( errno, ::boost::system::system_category() );
|
190
190
|
return time_point();
|
191
191
|
}
|
192
192
|
}
|
@@ -226,17 +226,17 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
|
|
226
226
|
clock_t c = ::times( &tm );
|
227
227
|
if ( c == clock_t(-1) ) // error
|
228
228
|
{
|
229
|
-
if (
|
229
|
+
if (::boost::chrono::is_throws(ec))
|
230
230
|
{
|
231
231
|
boost::throw_exception(
|
232
232
|
system::system_error(
|
233
233
|
errno,
|
234
|
-
|
234
|
+
::boost::system::system_category(),
|
235
235
|
"chrono::process_system_cpu_clock" ));
|
236
236
|
}
|
237
237
|
else
|
238
238
|
{
|
239
|
-
ec.assign( errno,
|
239
|
+
ec.assign( errno, ::boost::system::system_category() );
|
240
240
|
return time_point();
|
241
241
|
}
|
242
242
|
}
|
@@ -244,7 +244,7 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
|
|
244
244
|
{
|
245
245
|
if ( chrono_detail::tick_factor() != -1 )
|
246
246
|
{
|
247
|
-
if (
|
247
|
+
if (!::boost::chrono::is_throws(ec))
|
248
248
|
{
|
249
249
|
ec.clear();
|
250
250
|
}
|
@@ -253,17 +253,17 @@ process_system_cpu_clock::time_point process_system_cpu_clock::now(
|
|
253
253
|
}
|
254
254
|
else
|
255
255
|
{
|
256
|
-
if (
|
256
|
+
if (::boost::chrono::is_throws(ec))
|
257
257
|
{
|
258
258
|
boost::throw_exception(
|
259
259
|
system::system_error(
|
260
260
|
errno,
|
261
|
-
|
261
|
+
::boost::system::system_category(),
|
262
262
|
"chrono::process_system_cpu_clock" ));
|
263
263
|
}
|
264
264
|
else
|
265
265
|
{
|
266
|
-
ec.assign( errno,
|
266
|
+
ec.assign( errno, ::boost::system::system_category() );
|
267
267
|
return time_point();
|
268
268
|
}
|
269
269
|
}
|
@@ -306,17 +306,17 @@ process_cpu_clock::time_point process_cpu_clock::now(
|
|
306
306
|
clock_t c = ::times( &tm );
|
307
307
|
if ( c == clock_t(-1) ) // error
|
308
308
|
{
|
309
|
-
if (
|
309
|
+
if (::boost::chrono::is_throws(ec))
|
310
310
|
{
|
311
311
|
boost::throw_exception(
|
312
312
|
system::system_error(
|
313
313
|
errno,
|
314
|
-
|
314
|
+
::boost::system::system_category(),
|
315
315
|
"chrono::process_clock" ));
|
316
316
|
}
|
317
317
|
else
|
318
318
|
{
|
319
|
-
ec.assign( errno,
|
319
|
+
ec.assign( errno, ::boost::system::system_category() );
|
320
320
|
return time_point();
|
321
321
|
}
|
322
322
|
}
|
@@ -332,17 +332,17 @@ process_cpu_clock::time_point process_cpu_clock::now(
|
|
332
332
|
}
|
333
333
|
else
|
334
334
|
{
|
335
|
-
if (
|
335
|
+
if (::boost::chrono::is_throws(ec))
|
336
336
|
{
|
337
337
|
boost::throw_exception(
|
338
338
|
system::system_error(
|
339
339
|
errno,
|
340
|
-
|
340
|
+
::boost::system::system_category(),
|
341
341
|
"chrono::process_clock" ));
|
342
342
|
}
|
343
343
|
else
|
344
344
|
{
|
345
|
-
ec.assign( errno,
|
345
|
+
ec.assign( errno, ::boost::system::system_category() );
|
346
346
|
return time_point();
|
347
347
|
}
|
348
348
|
}
|
@@ -65,21 +65,21 @@ namespace boost { namespace chrono {
|
|
65
65
|
if ( ::clock_gettime( clock_id, &ts ) )
|
66
66
|
#endif
|
67
67
|
{
|
68
|
-
if (
|
68
|
+
if (::boost::chrono::is_throws(ec))
|
69
69
|
{
|
70
70
|
boost::throw_exception(
|
71
71
|
system::system_error(
|
72
72
|
errno,
|
73
|
-
|
73
|
+
::boost::system::system_category(),
|
74
74
|
"chrono::thread_clock" ));
|
75
75
|
}
|
76
76
|
else
|
77
77
|
{
|
78
|
-
ec.assign( errno,
|
78
|
+
ec.assign( errno, ::boost::system::system_category() );
|
79
79
|
return time_point();
|
80
80
|
}
|
81
81
|
}
|
82
|
-
if (
|
82
|
+
if (!::boost::chrono::is_throws(ec))
|
83
83
|
{
|
84
84
|
ec.clear();
|
85
85
|
}
|
@@ -10,10 +10,11 @@
|
|
10
10
|
|
11
11
|
#include <boost/system/error_code.hpp>
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
namespace boost {
|
14
|
+
namespace chrono {
|
15
|
+
inline bool is_throws(system::error_code & ec) { return (&ec==&boost::throws()); }
|
16
|
+
}
|
17
|
+
}
|
17
18
|
|
18
19
|
#endif
|
19
20
|
#endif
|
@@ -767,7 +767,7 @@ namespace boost
|
|
767
767
|
}
|
768
768
|
inline int32_t days_from_1970(int32_t year)
|
769
769
|
{
|
770
|
-
static const
|
770
|
+
static const int32_t days_from_0_to_1970 = days_from_0(1970);
|
771
771
|
return days_from_0(year) - days_from_0_to_1970;
|
772
772
|
}
|
773
773
|
inline int32_t days_from_1jan(int32_t year,int32_t month,int32_t day)
|
@@ -16,7 +16,7 @@
|
|
16
16
|
#endif
|
17
17
|
|
18
18
|
#include <boost/circular_buffer_fwd.hpp>
|
19
|
-
#include <boost/
|
19
|
+
#include <boost/config/workaround.hpp>
|
20
20
|
#include <boost/static_assert.hpp>
|
21
21
|
|
22
22
|
// BOOST_CB_ENABLE_DEBUG: Debug support control.
|
@@ -36,10 +36,10 @@
|
|
36
36
|
#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0550) || BOOST_WORKAROUND(__MWERKS__, <= 0x2407)
|
37
37
|
#define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) ((void)0)
|
38
38
|
#else
|
39
|
-
#include <
|
39
|
+
#include <iterator>
|
40
40
|
#include <boost/type_traits/is_convertible.hpp>
|
41
41
|
#define BOOST_CB_IS_CONVERTIBLE(Iterator, Type) \
|
42
|
-
BOOST_STATIC_ASSERT((is_convertible<typename
|
42
|
+
BOOST_STATIC_ASSERT((is_convertible<typename std::iterator_traits<Iterator>::value_type, Type>::value))
|
43
43
|
#endif
|
44
44
|
|
45
45
|
// BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS:
|
@@ -0,0 +1,89 @@
|
|
1
|
+
// Copyright 2018 Glen Joseph Fernandes
|
2
|
+
// (glenjofe@gmail.com)
|
3
|
+
//
|
4
|
+
// Distributed under the Boost Software License, Version 1.0.
|
5
|
+
// (See accompanying file LICENSE_1_0.txt or copy at
|
6
|
+
// http://www.boost.org/LICENSE_1_0.txt)
|
7
|
+
|
8
|
+
#ifndef BOOST_CIRCULAR_BUFFER_ALLOCATORS_HPP
|
9
|
+
#define BOOST_CIRCULAR_BUFFER_ALLOCATORS_HPP
|
10
|
+
|
11
|
+
#include <boost/config.hpp>
|
12
|
+
#if defined(BOOST_NO_CXX11_ALLOCATOR)
|
13
|
+
#define BOOST_CB_NO_CXX11_ALLOCATOR
|
14
|
+
#elif defined(BOOST_LIBSTDCXX_VERSION) && (BOOST_LIBSTDCXX_VERSION < 40800)
|
15
|
+
#define BOOST_CB_NO_CXX11_ALLOCATOR
|
16
|
+
#endif
|
17
|
+
#include <limits>
|
18
|
+
#if !defined(BOOST_CB_NO_CXX11_ALLOCATOR)
|
19
|
+
#include <memory>
|
20
|
+
#else
|
21
|
+
#include <new>
|
22
|
+
#endif
|
23
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
24
|
+
#include <utility>
|
25
|
+
#endif
|
26
|
+
|
27
|
+
namespace boost {
|
28
|
+
namespace cb_details {
|
29
|
+
|
30
|
+
#if !defined(BOOST_CB_NO_CXX11_ALLOCATOR)
|
31
|
+
template<class A>
|
32
|
+
struct allocator_traits
|
33
|
+
: std::allocator_traits<A> {
|
34
|
+
using typename std::allocator_traits<A>::value_type;
|
35
|
+
using typename std::allocator_traits<A>::size_type;
|
36
|
+
|
37
|
+
static size_type max_size(const A&) BOOST_NOEXCEPT {
|
38
|
+
return (std::numeric_limits<size_type>::max)() / sizeof(value_type);
|
39
|
+
}
|
40
|
+
};
|
41
|
+
#else
|
42
|
+
template<class A>
|
43
|
+
struct allocator_traits {
|
44
|
+
typedef typename A::value_type value_type;
|
45
|
+
typedef typename A::pointer pointer;
|
46
|
+
typedef typename A::const_pointer const_pointer;
|
47
|
+
typedef typename A::difference_type difference_type;
|
48
|
+
typedef typename A::size_type size_type;
|
49
|
+
|
50
|
+
static size_type max_size(const A&) BOOST_NOEXCEPT {
|
51
|
+
return (std::numeric_limits<size_type>::max)() / sizeof(value_type);
|
52
|
+
}
|
53
|
+
|
54
|
+
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
55
|
+
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
56
|
+
template<class U, class... Args>
|
57
|
+
static void construct(const A&, U* ptr, Args&&... args) {
|
58
|
+
::new((void*)ptr) U(std::forward<Args>(args)...);
|
59
|
+
}
|
60
|
+
#else
|
61
|
+
template<class U, class V>
|
62
|
+
static void construct(const A&, U* ptr, V&& value) {
|
63
|
+
::new((void*)ptr) U(std::forward<V>(value));
|
64
|
+
}
|
65
|
+
#endif
|
66
|
+
#else
|
67
|
+
template<class U, class V>
|
68
|
+
static void construct(const A&, U* ptr, const V& value) {
|
69
|
+
::new((void*)ptr) U(value);
|
70
|
+
}
|
71
|
+
|
72
|
+
template<class U, class V>
|
73
|
+
static void construct(const A&, U* ptr, V& value) {
|
74
|
+
::new((void*)ptr) U(value);
|
75
|
+
}
|
76
|
+
#endif
|
77
|
+
|
78
|
+
template<class U>
|
79
|
+
static void destroy(const A&, U* ptr) {
|
80
|
+
(void)ptr;
|
81
|
+
ptr->~U();
|
82
|
+
}
|
83
|
+
};
|
84
|
+
#endif
|
85
|
+
|
86
|
+
} // cb_details
|
87
|
+
} // boost
|
88
|
+
|
89
|
+
#endif
|
@@ -3,7 +3,9 @@
|
|
3
3
|
// Copyright (c) 2003-2008 Jan Gaspar
|
4
4
|
// Copyright (c) 2013 Paul A. Bristow // Doxygen comments changed.
|
5
5
|
// Copyright (c) 2013 Antony Polukhin // Move semantics implementation.
|
6
|
-
|
6
|
+
|
7
|
+
// Copyright 2014,2018 Glen Joseph Fernandes
|
8
|
+
// (glenjofe@gmail.com)
|
7
9
|
|
8
10
|
// Use, modification, and distribution is subject to the Boost Software
|
9
11
|
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
@@ -17,12 +19,10 @@
|
|
17
19
|
#endif
|
18
20
|
|
19
21
|
#include <boost/config.hpp>
|
20
|
-
#include <boost/call_traits.hpp>
|
21
22
|
#include <boost/concept_check.hpp>
|
22
23
|
#include <boost/limits.hpp>
|
23
|
-
#include <boost/
|
24
|
-
#include <boost/
|
25
|
-
#include <boost/iterator/iterator_traits.hpp>
|
24
|
+
#include <boost/circular_buffer/allocators.hpp>
|
25
|
+
#include <boost/core/empty_value.hpp>
|
26
26
|
#include <boost/type_traits/is_stateless.hpp>
|
27
27
|
#include <boost/type_traits/is_integral.hpp>
|
28
28
|
#include <boost/type_traits/is_scalar.hpp>
|
@@ -32,8 +32,8 @@
|
|
32
32
|
#include <boost/type_traits/conditional.hpp>
|
33
33
|
#include <boost/move/adl_move_swap.hpp>
|
34
34
|
#include <boost/move/move.hpp>
|
35
|
-
#include <boost/utility/addressof.hpp>
|
36
35
|
#include <algorithm>
|
36
|
+
#include <iterator>
|
37
37
|
#include <utility>
|
38
38
|
#include <deque>
|
39
39
|
#include <stdexcept>
|
@@ -70,12 +70,15 @@ namespace boost {
|
|
70
70
|
*/
|
71
71
|
template <class T, class Alloc>
|
72
72
|
class circular_buffer
|
73
|
+
:
|
73
74
|
/*! \cond */
|
74
75
|
#if BOOST_CB_ENABLE_DEBUG
|
75
|
-
|
76
|
+
public cb_details::debug_iterator_registry,
|
76
77
|
#endif
|
77
78
|
/*! \endcond */
|
79
|
+
private empty_value<Alloc>
|
78
80
|
{
|
81
|
+
typedef empty_value<Alloc> base;
|
79
82
|
|
80
83
|
// Requirements
|
81
84
|
//BOOST_CLASS_REQUIRE(T, boost, SGIAssignableConcept);
|
@@ -96,31 +99,31 @@ public:
|
|
96
99
|
typedef circular_buffer<T, Alloc> this_type;
|
97
100
|
|
98
101
|
//! The type of elements stored in the <code>circular_buffer</code>.
|
99
|
-
typedef typename
|
102
|
+
typedef typename cb_details::allocator_traits<Alloc>::value_type value_type;
|
100
103
|
|
101
104
|
//! A pointer to an element.
|
102
|
-
typedef typename
|
105
|
+
typedef typename cb_details::allocator_traits<Alloc>::pointer pointer;
|
103
106
|
|
104
107
|
//! A const pointer to the element.
|
105
|
-
typedef typename
|
108
|
+
typedef typename cb_details::allocator_traits<Alloc>::const_pointer const_pointer;
|
106
109
|
|
107
110
|
//! A reference to an element.
|
108
|
-
typedef
|
111
|
+
typedef value_type& reference;
|
109
112
|
|
110
113
|
//! A const reference to an element.
|
111
|
-
typedef
|
114
|
+
typedef const value_type& const_reference;
|
112
115
|
|
113
116
|
//! The distance type.
|
114
117
|
/*!
|
115
118
|
(A signed integral type used to represent the distance between two iterators.)
|
116
119
|
*/
|
117
|
-
typedef typename
|
120
|
+
typedef typename cb_details::allocator_traits<Alloc>::difference_type difference_type;
|
118
121
|
|
119
122
|
//! The size type.
|
120
123
|
/*!
|
121
124
|
(An unsigned integral type that can represent any non-negative value of the container's distance type.)
|
122
125
|
*/
|
123
|
-
typedef typename
|
126
|
+
typedef typename cb_details::allocator_traits<Alloc>::size_type size_type;
|
124
127
|
|
125
128
|
//! The type of an allocator used in the <code>circular_buffer</code>.
|
126
129
|
typedef Alloc allocator_type;
|
@@ -128,16 +131,16 @@ public:
|
|
128
131
|
// Iterators
|
129
132
|
|
130
133
|
//! A const (random access) iterator used to iterate through the <code>circular_buffer</code>.
|
131
|
-
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::const_traits<
|
134
|
+
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::const_traits<cb_details::allocator_traits<Alloc> > > const_iterator;
|
132
135
|
|
133
136
|
//! A (random access) iterator used to iterate through the <code>circular_buffer</code>.
|
134
|
-
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::nonconst_traits<
|
137
|
+
typedef cb_details::iterator< circular_buffer<T, Alloc>, cb_details::nonconst_traits<cb_details::allocator_traits<Alloc> > > iterator;
|
135
138
|
|
136
139
|
//! A const iterator used to iterate backwards through a <code>circular_buffer</code>.
|
137
|
-
typedef
|
140
|
+
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
138
141
|
|
139
142
|
//! An iterator used to iterate backwards through a <code>circular_buffer</code>.
|
140
|
-
typedef
|
143
|
+
typedef std::reverse_iterator<iterator> reverse_iterator;
|
141
144
|
|
142
145
|
// Container specific types
|
143
146
|
|
@@ -193,9 +196,6 @@ private:
|
|
193
196
|
//! The number of items currently stored in the circular buffer.
|
194
197
|
size_type m_size;
|
195
198
|
|
196
|
-
//! The allocator.
|
197
|
-
allocator_type m_alloc;
|
198
|
-
|
199
199
|
// Friends
|
200
200
|
#if defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
|
201
201
|
friend iterator;
|
@@ -219,7 +219,7 @@ public:
|
|
219
219
|
Constant (in the size of the <code>circular_buffer</code>).
|
220
220
|
\sa <code>get_allocator()</code> for obtaining an allocator %reference.
|
221
221
|
*/
|
222
|
-
allocator_type get_allocator() const BOOST_NOEXCEPT { return
|
222
|
+
allocator_type get_allocator() const BOOST_NOEXCEPT { return alloc(); }
|
223
223
|
|
224
224
|
//! Get the allocator reference.
|
225
225
|
/*!
|
@@ -235,7 +235,7 @@ public:
|
|
235
235
|
although use of stateful allocators in STL is discouraged.
|
236
236
|
\sa <code>get_allocator() const</code>
|
237
237
|
*/
|
238
|
-
allocator_type& get_allocator() BOOST_NOEXCEPT { return
|
238
|
+
allocator_type& get_allocator() BOOST_NOEXCEPT { return alloc(); }
|
239
239
|
|
240
240
|
// Element access
|
241
241
|
|
@@ -666,7 +666,7 @@ public:
|
|
666
666
|
break;
|
667
667
|
}
|
668
668
|
if (is_uninitialized(dest)) {
|
669
|
-
|
669
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(dest), boost::move_if_noexcept(*src));
|
670
670
|
++constructed;
|
671
671
|
} else {
|
672
672
|
value_type tmp = boost::move_if_noexcept(*src);
|
@@ -787,7 +787,7 @@ public:
|
|
787
787
|
\sa <code>size()</code>, <code>capacity()</code>, <code>reserve()</code>
|
788
788
|
*/
|
789
789
|
size_type max_size() const BOOST_NOEXCEPT {
|
790
|
-
return (std::min<size_type>)(
|
790
|
+
return (std::min<size_type>)(cb_details::allocator_traits<Alloc>::max_size(alloc()), (std::numeric_limits<difference_type>::max)());
|
791
791
|
}
|
792
792
|
|
793
793
|
//! Is the <code>circular_buffer</code> empty?
|
@@ -878,7 +878,7 @@ public:
|
|
878
878
|
iterator b = begin();
|
879
879
|
BOOST_TRY {
|
880
880
|
reset(buff,
|
881
|
-
cb_details::uninitialized_move_if_noexcept(b, b + (std::min)(new_capacity, size()), buff,
|
881
|
+
cb_details::uninitialized_move_if_noexcept(b, b + (std::min)(new_capacity, size()), buff, alloc()),
|
882
882
|
new_capacity);
|
883
883
|
} BOOST_CATCH(...) {
|
884
884
|
deallocate(buff, new_capacity);
|
@@ -954,7 +954,7 @@ public:
|
|
954
954
|
iterator e = end();
|
955
955
|
BOOST_TRY {
|
956
956
|
reset(buff, cb_details::uninitialized_move_if_noexcept(e - (std::min)(new_capacity, size()),
|
957
|
-
e, buff,
|
957
|
+
e, buff, alloc()), new_capacity);
|
958
958
|
} BOOST_CATCH(...) {
|
959
959
|
deallocate(buff, new_capacity);
|
960
960
|
BOOST_RETHROW
|
@@ -1020,7 +1020,7 @@ public:
|
|
1020
1020
|
<code>set_capacity(capacity_type)</code>
|
1021
1021
|
*/
|
1022
1022
|
explicit circular_buffer(const allocator_type& alloc = allocator_type()) BOOST_NOEXCEPT
|
1023
|
-
: m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0)
|
1023
|
+
: base(boost::empty_init_t(), alloc), m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0) {}
|
1024
1024
|
|
1025
1025
|
//! Create an empty <code>circular_buffer</code> with the specified capacity.
|
1026
1026
|
/*!
|
@@ -1033,7 +1033,7 @@ public:
|
|
1033
1033
|
Constant.
|
1034
1034
|
*/
|
1035
1035
|
explicit circular_buffer(capacity_type buffer_capacity, const allocator_type& alloc = allocator_type())
|
1036
|
-
:
|
1036
|
+
: base(boost::empty_init_t(), alloc), m_size(0) {
|
1037
1037
|
initialize_buffer(buffer_capacity);
|
1038
1038
|
m_first = m_last = m_buff;
|
1039
1039
|
}
|
@@ -1052,7 +1052,7 @@ public:
|
|
1052
1052
|
Linear (in the <code>n</code>).
|
1053
1053
|
*/
|
1054
1054
|
circular_buffer(size_type n, param_value_type item, const allocator_type& alloc = allocator_type())
|
1055
|
-
:
|
1055
|
+
: base(boost::empty_init_t(), alloc), m_size(n) {
|
1056
1056
|
initialize_buffer(n, item);
|
1057
1057
|
m_first = m_last = m_buff;
|
1058
1058
|
}
|
@@ -1074,7 +1074,7 @@ public:
|
|
1074
1074
|
*/
|
1075
1075
|
circular_buffer(capacity_type buffer_capacity, size_type n, param_value_type item,
|
1076
1076
|
const allocator_type& alloc = allocator_type())
|
1077
|
-
:
|
1077
|
+
: base(boost::empty_init_t(), alloc), m_size(n) {
|
1078
1078
|
BOOST_CB_ASSERT(buffer_capacity >= size()); // check for capacity lower than size
|
1079
1079
|
initialize_buffer(buffer_capacity, item);
|
1080
1080
|
m_first = m_buff;
|
@@ -1097,11 +1097,12 @@ public:
|
|
1097
1097
|
#if BOOST_CB_ENABLE_DEBUG
|
1098
1098
|
debug_iterator_registry(),
|
1099
1099
|
#endif
|
1100
|
-
|
1100
|
+
base(boost::empty_init_t(), cb.get_allocator()),
|
1101
|
+
m_size(cb.size()) {
|
1101
1102
|
initialize_buffer(cb.capacity());
|
1102
1103
|
m_first = m_buff;
|
1103
1104
|
BOOST_TRY {
|
1104
|
-
m_last = cb_details::uninitialized_copy(cb.begin(), cb.end(), m_buff,
|
1105
|
+
m_last = cb_details::uninitialized_copy(cb.begin(), cb.end(), m_buff, alloc());
|
1105
1106
|
} BOOST_CATCH(...) {
|
1106
1107
|
deallocate(m_buff, cb.capacity());
|
1107
1108
|
BOOST_RETHROW
|
@@ -1121,7 +1122,7 @@ public:
|
|
1121
1122
|
\par Constant.
|
1122
1123
|
*/
|
1123
1124
|
circular_buffer(circular_buffer<T, Alloc>&& cb) BOOST_NOEXCEPT
|
1124
|
-
: m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0)
|
1125
|
+
: base(boost::empty_init_t(), cb.get_allocator()), m_buff(0), m_end(0), m_first(0), m_last(0), m_size(0) {
|
1125
1126
|
cb.swap(*this);
|
1126
1127
|
}
|
1127
1128
|
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
|
@@ -1144,7 +1145,7 @@ public:
|
|
1144
1145
|
*/
|
1145
1146
|
template <class InputIterator>
|
1146
1147
|
circular_buffer(InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type())
|
1147
|
-
:
|
1148
|
+
: base(boost::empty_init_t(), alloc) {
|
1148
1149
|
initialize(first, last, is_integral<InputIterator>());
|
1149
1150
|
}
|
1150
1151
|
|
@@ -1174,7 +1175,7 @@ public:
|
|
1174
1175
|
template <class InputIterator>
|
1175
1176
|
circular_buffer(capacity_type buffer_capacity, InputIterator first, InputIterator last,
|
1176
1177
|
const allocator_type& alloc = allocator_type())
|
1177
|
-
:
|
1178
|
+
: base(boost::empty_init_t(), alloc) {
|
1178
1179
|
initialize(buffer_capacity, first, last, is_integral<InputIterator>());
|
1179
1180
|
}
|
1180
1181
|
|
@@ -1225,7 +1226,7 @@ public:
|
|
1225
1226
|
return *this;
|
1226
1227
|
pointer buff = allocate(cb.capacity());
|
1227
1228
|
BOOST_TRY {
|
1228
|
-
reset(buff, cb_details::uninitialized_copy(cb.begin(), cb.end(), buff,
|
1229
|
+
reset(buff, cb_details::uninitialized_copy(cb.begin(), cb.end(), buff, alloc()), cb.capacity());
|
1229
1230
|
} BOOST_CATCH(...) {
|
1230
1231
|
deallocate(buff, cb.capacity());
|
1231
1232
|
BOOST_RETHROW
|
@@ -1245,7 +1246,7 @@ public:
|
|
1245
1246
|
*/
|
1246
1247
|
circular_buffer<T, Alloc>& operator = (circular_buffer<T, Alloc>&& cb) BOOST_NOEXCEPT {
|
1247
1248
|
cb.swap(*this); // now `this` holds `cb`
|
1248
|
-
circular_buffer<T, Alloc>(get_allocator()) //
|
1249
|
+
circular_buffer<T, Alloc>(get_allocator()) // temporary that holds initial `cb` allocator
|
1249
1250
|
.swap(cb); // makes `cb` empty
|
1250
1251
|
return *this;
|
1251
1252
|
}
|
@@ -1276,7 +1277,7 @@ public:
|
|
1276
1277
|
<code>assign(capacity_type, InputIterator, InputIterator)</code>
|
1277
1278
|
*/
|
1278
1279
|
void assign(size_type n, param_value_type item) {
|
1279
|
-
assign_n(n, n, cb_details::assign_n<param_value_type, allocator_type>(n, item,
|
1280
|
+
assign_n(n, n, cb_details::assign_n<param_value_type, allocator_type>(n, item, alloc()));
|
1280
1281
|
}
|
1281
1282
|
|
1282
1283
|
//! Assign <code>n</code> items into the <code>circular_buffer</code> specifying the capacity.
|
@@ -1306,7 +1307,7 @@ public:
|
|
1306
1307
|
*/
|
1307
1308
|
void assign(capacity_type buffer_capacity, size_type n, param_value_type item) {
|
1308
1309
|
BOOST_CB_ASSERT(buffer_capacity >= n); // check for new capacity lower than n
|
1309
|
-
assign_n(buffer_capacity, n, cb_details::assign_n<param_value_type, allocator_type>(n, item,
|
1310
|
+
assign_n(buffer_capacity, n, cb_details::assign_n<param_value_type, allocator_type>(n, item, alloc()));
|
1310
1311
|
}
|
1311
1312
|
|
1312
1313
|
//! Assign a copy of the range into the <code>circular_buffer</code>.
|
@@ -1422,7 +1423,7 @@ private:
|
|
1422
1423
|
increment(m_last);
|
1423
1424
|
m_first = m_last;
|
1424
1425
|
} else {
|
1425
|
-
|
1426
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(m_last), static_cast<ValT>(item));
|
1426
1427
|
increment(m_last);
|
1427
1428
|
++m_size;
|
1428
1429
|
}
|
@@ -1439,7 +1440,7 @@ private:
|
|
1439
1440
|
m_last = m_first;
|
1440
1441
|
} else {
|
1441
1442
|
decrement(m_first);
|
1442
|
-
|
1443
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(m_first), static_cast<ValT>(item));
|
1443
1444
|
++m_size;
|
1444
1445
|
}
|
1445
1446
|
} BOOST_CATCH(...) {
|
@@ -2173,7 +2174,7 @@ public:
|
|
2173
2174
|
the erased element (towards the beginning).
|
2174
2175
|
\par Complexity
|
2175
2176
|
Linear (in <code>std::distance(begin(), pos)</code>).
|
2176
|
-
\note This method is
|
2177
|
+
\note This method is symmetric to the <code>erase(iterator)</code> method and is more effective than
|
2177
2178
|
<code>erase(iterator)</code> if the iterator <code>pos</code> is close to the beginning of the
|
2178
2179
|
<code>circular_buffer</code>. (See the <i>Complexity</i>.)
|
2179
2180
|
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>,
|
@@ -2214,7 +2215,7 @@ public:
|
|
2214
2215
|
the erased range (towards the beginning).
|
2215
2216
|
\par Complexity
|
2216
2217
|
Linear (in <code>std::distance(begin(), last)</code>).
|
2217
|
-
\note This method is
|
2218
|
+
\note This method is symmetric to the <code>erase(iterator, iterator)</code> method and is more effective than
|
2218
2219
|
<code>erase(iterator, iterator)</code> if <code>std::distance(begin(), first)</code> is lower that
|
2219
2220
|
<code>std::distance(last, end())</code>.
|
2220
2221
|
\sa <code>erase(iterator)</code>, <code>erase(iterator, iterator)</code>, <code>rerase(iterator)</code>,
|
@@ -2367,23 +2368,31 @@ private:
|
|
2367
2368
|
//! Map the null pointer to virtual end of circular buffer.
|
2368
2369
|
pointer map_pointer(pointer p) const { return p == 0 ? m_last : p; }
|
2369
2370
|
|
2371
|
+
const Alloc& alloc() const {
|
2372
|
+
return base::get();
|
2373
|
+
}
|
2374
|
+
|
2375
|
+
Alloc& alloc() {
|
2376
|
+
return base::get();
|
2377
|
+
}
|
2378
|
+
|
2370
2379
|
//! Allocate memory.
|
2371
2380
|
pointer allocate(size_type n) {
|
2372
2381
|
if (n > max_size())
|
2373
2382
|
throw_exception(std::length_error("circular_buffer"));
|
2374
2383
|
#if BOOST_CB_ENABLE_DEBUG
|
2375
|
-
pointer p = (n == 0) ? 0 :
|
2384
|
+
pointer p = (n == 0) ? 0 : alloc().allocate(n);
|
2376
2385
|
cb_details::do_fill_uninitialized_memory(p, sizeof(value_type) * n);
|
2377
2386
|
return p;
|
2378
2387
|
#else
|
2379
|
-
return (n == 0) ? 0 :
|
2388
|
+
return (n == 0) ? 0 : alloc().allocate(n);
|
2380
2389
|
#endif
|
2381
2390
|
}
|
2382
2391
|
|
2383
2392
|
//! Deallocate memory.
|
2384
2393
|
void deallocate(pointer p, size_type n) {
|
2385
2394
|
if (p != 0)
|
2386
|
-
|
2395
|
+
alloc().deallocate(p, n);
|
2387
2396
|
}
|
2388
2397
|
|
2389
2398
|
//! Does the pointer point to the uninitialized memory?
|
@@ -2414,7 +2423,7 @@ private:
|
|
2414
2423
|
*/
|
2415
2424
|
void construct_or_replace(bool construct, pointer pos, param_value_type item) {
|
2416
2425
|
if (construct)
|
2417
|
-
|
2426
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(pos), item);
|
2418
2427
|
else
|
2419
2428
|
replace(pos, item);
|
2420
2429
|
}
|
@@ -2426,14 +2435,14 @@ private:
|
|
2426
2435
|
*/
|
2427
2436
|
void construct_or_replace(bool construct, pointer pos, rvalue_type item) {
|
2428
2437
|
if (construct)
|
2429
|
-
|
2438
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(pos), boost::move(item));
|
2430
2439
|
else
|
2431
2440
|
replace(pos, boost::move(item));
|
2432
2441
|
}
|
2433
2442
|
|
2434
2443
|
//! Destroy an item.
|
2435
2444
|
void destroy_item(pointer p) {
|
2436
|
-
|
2445
|
+
cb_details::allocator_traits<Alloc>::destroy(alloc(), boost::to_address(p));
|
2437
2446
|
#if BOOST_CB_ENABLE_DEBUG
|
2438
2447
|
invalidate_iterators(iterator(this, p));
|
2439
2448
|
cb_details::do_fill_uninitialized_memory(p, sizeof(value_type));
|
@@ -2488,7 +2497,7 @@ private:
|
|
2488
2497
|
void initialize_buffer(capacity_type buffer_capacity, param_value_type item) {
|
2489
2498
|
initialize_buffer(buffer_capacity);
|
2490
2499
|
BOOST_TRY {
|
2491
|
-
cb_details::uninitialized_fill_n_with_alloc(m_buff, size(), item,
|
2500
|
+
cb_details::uninitialized_fill_n_with_alloc(m_buff, size(), item, alloc());
|
2492
2501
|
} BOOST_CATCH(...) {
|
2493
2502
|
deallocate(m_buff, size());
|
2494
2503
|
BOOST_RETHROW
|
@@ -2509,9 +2518,9 @@ private:
|
|
2509
2518
|
void initialize(Iterator first, Iterator last, const false_type&) {
|
2510
2519
|
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
|
2511
2520
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
|
2512
|
-
initialize(first, last,
|
2521
|
+
initialize(first, last, std::iterator_traits<Iterator>::iterator_category());
|
2513
2522
|
#else
|
2514
|
-
initialize(first, last, BOOST_DEDUCED_TYPENAME
|
2523
|
+
initialize(first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
|
2515
2524
|
#endif
|
2516
2525
|
}
|
2517
2526
|
|
@@ -2520,7 +2529,7 @@ private:
|
|
2520
2529
|
void initialize(InputIterator first, InputIterator last, const std::input_iterator_tag&) {
|
2521
2530
|
BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS // check if the STL provides templated iterator constructors
|
2522
2531
|
// for containers
|
2523
|
-
std::deque<value_type, allocator_type> tmp(first, last,
|
2532
|
+
std::deque<value_type, allocator_type> tmp(first, last, alloc());
|
2524
2533
|
size_type distance = tmp.size();
|
2525
2534
|
initialize(distance, boost::make_move_iterator(tmp.begin()), boost::make_move_iterator(tmp.end()), distance);
|
2526
2535
|
}
|
@@ -2548,9 +2557,9 @@ private:
|
|
2548
2557
|
void initialize(capacity_type buffer_capacity, Iterator first, Iterator last, const false_type&) {
|
2549
2558
|
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
|
2550
2559
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
|
2551
|
-
initialize(buffer_capacity, first, last,
|
2560
|
+
initialize(buffer_capacity, first, last, std::iterator_traits<Iterator>::iterator_category());
|
2552
2561
|
#else
|
2553
|
-
initialize(buffer_capacity, first, last, BOOST_DEDUCED_TYPENAME
|
2562
|
+
initialize(buffer_capacity, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
|
2554
2563
|
#endif
|
2555
2564
|
}
|
2556
2565
|
|
@@ -2566,7 +2575,7 @@ private:
|
|
2566
2575
|
if (buffer_capacity == 0)
|
2567
2576
|
return;
|
2568
2577
|
while (first != last && !full()) {
|
2569
|
-
|
2578
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(m_last), *first++);
|
2570
2579
|
increment(m_last);
|
2571
2580
|
++m_size;
|
2572
2581
|
}
|
@@ -2602,7 +2611,7 @@ private:
|
|
2602
2611
|
m_size = distance;
|
2603
2612
|
}
|
2604
2613
|
BOOST_TRY {
|
2605
|
-
m_last = cb_details::uninitialized_copy(first, last, m_buff,
|
2614
|
+
m_last = cb_details::uninitialized_copy(first, last, m_buff, alloc());
|
2606
2615
|
} BOOST_CATCH(...) {
|
2607
2616
|
deallocate(m_buff, buffer_capacity);
|
2608
2617
|
BOOST_RETHROW
|
@@ -2628,7 +2637,7 @@ private:
|
|
2628
2637
|
|
2629
2638
|
//! Specialized method for swapping the allocator.
|
2630
2639
|
void swap_allocator(circular_buffer<T, Alloc>& cb, const false_type&) {
|
2631
|
-
adl_move_swap(
|
2640
|
+
adl_move_swap(alloc(), cb.alloc());
|
2632
2641
|
}
|
2633
2642
|
|
2634
2643
|
//! Specialized assign method.
|
@@ -2642,9 +2651,9 @@ private:
|
|
2642
2651
|
void assign(Iterator first, Iterator last, const false_type&) {
|
2643
2652
|
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
|
2644
2653
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
|
2645
|
-
assign(first, last,
|
2654
|
+
assign(first, last, std::iterator_traits<Iterator>::iterator_category());
|
2646
2655
|
#else
|
2647
|
-
assign(first, last, BOOST_DEDUCED_TYPENAME
|
2656
|
+
assign(first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
|
2648
2657
|
#endif
|
2649
2658
|
}
|
2650
2659
|
|
@@ -2653,11 +2662,11 @@ private:
|
|
2653
2662
|
void assign(InputIterator first, InputIterator last, const std::input_iterator_tag&) {
|
2654
2663
|
BOOST_CB_ASSERT_TEMPLATED_ITERATOR_CONSTRUCTORS // check if the STL provides templated iterator constructors
|
2655
2664
|
// for containers
|
2656
|
-
std::deque<value_type, allocator_type> tmp(first, last,
|
2665
|
+
std::deque<value_type, allocator_type> tmp(first, last, alloc());
|
2657
2666
|
size_type distance = tmp.size();
|
2658
2667
|
assign_n(distance, distance,
|
2659
2668
|
cb_details::make_assign_range
|
2660
|
-
(boost::make_move_iterator(tmp.begin()), boost::make_move_iterator(tmp.end()),
|
2669
|
+
(boost::make_move_iterator(tmp.begin()), boost::make_move_iterator(tmp.end()), alloc()));
|
2661
2670
|
}
|
2662
2671
|
|
2663
2672
|
//! Specialized assign method.
|
@@ -2665,7 +2674,7 @@ private:
|
|
2665
2674
|
void assign(ForwardIterator first, ForwardIterator last, const std::forward_iterator_tag&) {
|
2666
2675
|
BOOST_CB_ASSERT(std::distance(first, last) >= 0); // check for wrong range
|
2667
2676
|
size_type distance = std::distance(first, last);
|
2668
|
-
assign_n(distance, distance, cb_details::make_assign_range(first, last,
|
2677
|
+
assign_n(distance, distance, cb_details::make_assign_range(first, last, alloc()));
|
2669
2678
|
}
|
2670
2679
|
|
2671
2680
|
//! Specialized assign method.
|
@@ -2679,9 +2688,9 @@ private:
|
|
2679
2688
|
void assign(capacity_type new_capacity, Iterator first, Iterator last, const false_type&) {
|
2680
2689
|
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
|
2681
2690
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
|
2682
|
-
assign(new_capacity, first, last,
|
2691
|
+
assign(new_capacity, first, last, std::iterator_traits<Iterator>::iterator_category());
|
2683
2692
|
#else
|
2684
|
-
assign(new_capacity, first, last, BOOST_DEDUCED_TYPENAME
|
2693
|
+
assign(new_capacity, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
|
2685
2694
|
#endif
|
2686
2695
|
}
|
2687
2696
|
|
@@ -2692,7 +2701,7 @@ private:
|
|
2692
2701
|
clear();
|
2693
2702
|
insert(begin(), first, last);
|
2694
2703
|
} else {
|
2695
|
-
circular_buffer<value_type, allocator_type> tmp(new_capacity, first, last,
|
2704
|
+
circular_buffer<value_type, allocator_type> tmp(new_capacity, first, last, alloc());
|
2696
2705
|
tmp.swap(*this);
|
2697
2706
|
}
|
2698
2707
|
}
|
@@ -2708,7 +2717,7 @@ private:
|
|
2708
2717
|
distance = new_capacity;
|
2709
2718
|
}
|
2710
2719
|
assign_n(new_capacity, distance,
|
2711
|
-
cb_details::make_assign_range(first, last,
|
2720
|
+
cb_details::make_assign_range(first, last, alloc()));
|
2712
2721
|
}
|
2713
2722
|
|
2714
2723
|
//! Helper assign method.
|
@@ -2788,9 +2797,9 @@ private:
|
|
2788
2797
|
void insert(const iterator& pos, Iterator first, Iterator last, const false_type&) {
|
2789
2798
|
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
|
2790
2799
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
|
2791
|
-
insert(pos, first, last,
|
2800
|
+
insert(pos, first, last, std::iterator_traits<Iterator>::iterator_category());
|
2792
2801
|
#else
|
2793
|
-
insert(pos, first, last, BOOST_DEDUCED_TYPENAME
|
2802
|
+
insert(pos, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
|
2794
2803
|
#endif
|
2795
2804
|
}
|
2796
2805
|
|
@@ -2831,7 +2840,7 @@ private:
|
|
2831
2840
|
pointer p = m_last;
|
2832
2841
|
BOOST_TRY {
|
2833
2842
|
for (; ii < construct; ++ii, increment(p))
|
2834
|
-
|
2843
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(p), *wrapper());
|
2835
2844
|
for (;ii < n; ++ii, increment(p))
|
2836
2845
|
replace(p, *wrapper());
|
2837
2846
|
} BOOST_CATCH(...) {
|
@@ -2879,9 +2888,9 @@ private:
|
|
2879
2888
|
void rinsert(const iterator& pos, Iterator first, Iterator last, const false_type&) {
|
2880
2889
|
BOOST_CB_IS_CONVERTIBLE(Iterator, value_type); // check for invalid iterator type
|
2881
2890
|
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
|
2882
|
-
rinsert(pos, first, last,
|
2891
|
+
rinsert(pos, first, last, std::iterator_traits<Iterator>::iterator_category());
|
2883
2892
|
#else
|
2884
|
-
rinsert(pos, first, last, BOOST_DEDUCED_TYPENAME
|
2893
|
+
rinsert(pos, first, last, BOOST_DEDUCED_TYPENAME std::iterator_traits<Iterator>::iterator_category());
|
2885
2894
|
#endif
|
2886
2895
|
}
|
2887
2896
|
|
@@ -2925,7 +2934,7 @@ private:
|
|
2925
2934
|
for (;ii > construct; --ii, increment(p))
|
2926
2935
|
replace(p, *wrapper());
|
2927
2936
|
for (; ii > 0; --ii, increment(p))
|
2928
|
-
|
2937
|
+
cb_details::allocator_traits<Alloc>::construct(alloc(), boost::to_address(p), *wrapper());
|
2929
2938
|
} BOOST_CATCH(...) {
|
2930
2939
|
size_type constructed = ii < construct ? construct - ii : 0;
|
2931
2940
|
m_last = add(m_last, constructed);
|