passenger 5.1.4 → 5.1.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.editorconfig +9 -0
- data/CHANGELOG +9 -0
- data/build/cxx_tests.rb +11 -1
- data/build/documentation.rb +0 -32
- data/build/support/cxx_dependency_map.rb +602 -2
- data/build/test_basics.rb +3 -3
- data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +48 -0
- data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +33 -0
- data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +25 -0
- data/dev/ci/README.md +121 -0
- data/dev/ci/lib/functions.sh +129 -0
- data/dev/ci/lib/set-container-envvars.sh +46 -0
- data/dev/ci/lib/setup-container.sh +43 -0
- data/dev/ci/run-tests-natively +24 -0
- data/dev/ci/run-tests-with-docker +42 -0
- data/dev/ci/scripts/debug-console-wrapper.sh +27 -0
- data/dev/ci/scripts/docker-entrypoint-stage2.sh +17 -0
- data/dev/ci/scripts/docker-entrypoint.sh +17 -0
- data/dev/ci/scripts/inituidgid +17 -0
- data/dev/ci/scripts/run-tests-natively-stage2.sh +17 -0
- data/dev/ci/scripts/setup-host-natively.sh +11 -0
- data/dev/ci/setup-host +50 -0
- data/dev/ci/tests/apache2/run +6 -0
- data/dev/ci/tests/apache2/setup +4 -0
- data/dev/ci/tests/cxx/run +9 -0
- data/dev/ci/tests/cxx/setup +4 -0
- data/dev/ci/tests/nginx-dynamic/run +20 -0
- data/dev/ci/tests/nginx-dynamic/setup +4 -0
- data/dev/ci/tests/nginx/run +5 -0
- data/dev/ci/tests/nginx/setup +4 -0
- data/dev/ci/tests/nodejs/run +4 -0
- data/dev/ci/tests/nodejs/setup +4 -0
- data/dev/ci/tests/ruby/run +4 -0
- data/dev/ci/tests/ruby/setup +4 -0
- data/dev/ci/tests/source-packaging/run +4 -0
- data/dev/ci/tests/source-packaging/setup +4 -0
- data/dev/ci/tests/standalone/run +4 -0
- data/dev/ci/tests/standalone/setup +4 -0
- data/dev/copy_boost_headers +8 -2
- data/src/agent/Core/ApiServer.h +11 -5
- data/src/agent/Core/Controller.h +12 -46
- data/src/agent/Core/Controller/CheckoutSession.cpp +1 -1
- data/src/agent/Core/Controller/Config.h +369 -0
- data/src/agent/Core/Controller/ForwardResponse.cpp +4 -4
- data/src/agent/Core/Controller/Hooks.cpp +15 -3
- data/src/agent/Core/Controller/Implementation.cpp +1 -1
- data/src/agent/Core/Controller/InitRequest.cpp +28 -39
- data/src/agent/Core/Controller/InitializationAndShutdown.cpp +25 -60
- data/src/agent/Core/Controller/InternalUtils.cpp +0 -16
- data/src/agent/Core/Controller/Miscellaneous.cpp +0 -17
- data/src/agent/Core/Controller/Request.h +2 -0
- data/src/agent/Core/Controller/SendRequest.cpp +4 -4
- data/src/agent/Core/Controller/{StateInspectionAndConfiguration.cpp → StateInspection.cpp} +0 -22
- data/src/agent/Core/Controller/TurboCaching.h +11 -10
- data/src/agent/Core/CoreMain.cpp +16 -6
- data/src/agent/Core/ResponseCache.h +3 -3
- data/src/agent/Core/SpawningKit/SmartSpawner.h +9 -3
- data/src/agent/Core/SpawningKit/Spawner.h +7 -3
- data/src/agent/UstRouter/ApiServer.h +3 -2
- data/src/agent/UstRouter/Controller.h +66 -32
- data/src/agent/UstRouter/UstRouterMain.cpp +10 -2
- data/src/agent/Watchdog/ApiServer.h +3 -2
- data/src/agent/Watchdog/WatchdogMain.cpp +3 -1
- data/src/apache2_module/ConfigurationCommands.cpp +1 -1
- data/src/cxx_supportlib/ConfigKit/Common.h +125 -0
- data/src/cxx_supportlib/ConfigKit/ConfigKit.h +34 -0
- data/src/cxx_supportlib/ConfigKit/README.md +895 -0
- data/src/cxx_supportlib/ConfigKit/Schema.h +331 -0
- data/src/cxx_supportlib/ConfigKit/Store.h +385 -0
- data/src/cxx_supportlib/ConfigKit/TableTranslator.h +185 -0
- data/src/cxx_supportlib/ConfigKit/Utils.h +141 -0
- data/src/cxx_supportlib/ConfigKit/VariantMapUtils.h +81 -0
- data/src/cxx_supportlib/Constants.h +1 -1
- data/src/cxx_supportlib/Crypto.cpp +2 -2
- data/src/cxx_supportlib/Logging.h +0 -35
- data/src/cxx_supportlib/ServerKit/HttpServer.h +35 -16
- data/src/cxx_supportlib/ServerKit/Server.h +65 -25
- data/src/cxx_supportlib/oxt/macros.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/algorithm/string/replace.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/array.hpp +53 -42
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/atomic_template.hpp +11 -5
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/bitwise_cast.hpp +13 -2
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_gcc_x86.hpp +23 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/caps_msvc_x86.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/config.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/interlocked.hpp +8 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_emulated.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_alpha.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_arm.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_atomic.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_ppc.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sparc.hpp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_sync.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_gcc_x86_dcas.hpp +28 -17
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_linux_arm.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_arm.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/ops_msvc_x86.hpp +9 -4
- data/src/cxx_supportlib/vendor-modified/boost/atomic/detail/platform.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/bind/arg.hpp +10 -3
- data/src/cxx_supportlib/vendor-modified/boost/bind/bind.hpp +90 -18
- data/src/cxx_supportlib/vendor-modified/boost/cerrno.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/chrono/duration.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/auto_link.hpp +8 -3
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/borland.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/clang.hpp +35 -6
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/codegear.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/comeau.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/common_edg.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/compaq_cxx.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/cray.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/digitalmars.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc.hpp +19 -4
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/gcc_xml.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/greenhills.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/hp_acc.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/intel.hpp +29 -7
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/kai.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/metrowerks.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/mpw.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/nvcc.hpp +16 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pathscale.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/pgi.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sgi_mipspro.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/sunpro_cc.hpp +10 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/vacpp.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/visualc.hpp +44 -16
- data/src/cxx_supportlib/vendor-modified/boost/config/compiler/xlcpp.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/cygwin.hpp +1 -2
- data/src/cxx_supportlib/vendor-modified/boost/config/platform/linux.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/select_compiler_config.hpp +21 -21
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/dinkumware.hpp +42 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcomo.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libcpp.hpp +40 -7
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/libstdcpp3.hpp +39 -6
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/modena.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/msl.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/roguewave.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/sgi.hpp +8 -1
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/stlport.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/stdlib/vacpp.hpp +7 -0
- data/src/cxx_supportlib/vendor-modified/boost/config/suffix.hpp +33 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/adaptive_pool.hpp +0 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator.hpp +0 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/allocator_traits.hpp +34 -27
- data/src/cxx_supportlib/vendor-modified/boost/container/deque.hpp +62 -26
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/addressof.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/advanced_insert_int.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/compare_functors.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/config_begin.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/construct_in_place.hpp +39 -5
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/copy_move_algo.hpp +49 -32
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/dispatch_uses_allocator.hpp +175 -7
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/flat_tree.hpp +223 -98
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/is_sorted.hpp +57 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/iterators.hpp +88 -41
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mpl.hpp +7 -8
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/mutex.hpp +4 -9
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/node_alloc_holder.hpp +45 -18
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/pair.hpp +205 -26
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/tree.hpp +290 -181
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/value_init.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/variadic_templates_tools.hpp +24 -19
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/workaround.hpp +38 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_map.hpp +320 -46
- data/src/cxx_supportlib/vendor-modified/boost/container/flat_set.hpp +91 -18
- data/src/cxx_supportlib/vendor-modified/boost/container/list.hpp +23 -19
- data/src/cxx_supportlib/vendor-modified/boost/container/map.hpp +491 -120
- data/src/cxx_supportlib/vendor-modified/boost/container/new_allocator.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/container/node_allocator.hpp +0 -3
- data/src/cxx_supportlib/vendor-modified/boost/container/node_handle.hpp +399 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/deque.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_map.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/flat_set.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/list.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/map.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/set.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/slist.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/small_vector.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/stable_vector.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/string.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/pmr/vector.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/set.hpp +101 -20
- data/src/cxx_supportlib/vendor-modified/boost/container/slist.hpp +19 -14
- data/src/cxx_supportlib/vendor-modified/boost/container/small_vector.hpp +117 -59
- data/src/cxx_supportlib/vendor-modified/boost/container/stable_vector.hpp +8 -6
- data/src/cxx_supportlib/vendor-modified/boost/container/static_vector.hpp +33 -28
- data/src/cxx_supportlib/vendor-modified/boost/container/string.hpp +414 -70
- data/src/cxx_supportlib/vendor-modified/boost/container/throw_exception.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/container/uses_allocator_fwd.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/container/vector.hpp +134 -117
- data/src/cxx_supportlib/vendor-modified/boost/core/addressof.hpp +202 -99
- data/src/cxx_supportlib/vendor-modified/boost/core/demangle.hpp +8 -10
- data/src/cxx_supportlib/vendor-modified/boost/core/lightweight_test.hpp +217 -1
- data/src/cxx_supportlib/vendor-modified/boost/core/scoped_enum.hpp +29 -27
- data/src/cxx_supportlib/vendor-modified/boost/current_function.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/c_time.hpp +13 -13
- data/src/cxx_supportlib/vendor-modified/boost/date_time/constrained_value.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_duration_types.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_facet.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/date_names_put.hpp +8 -7
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_calendar.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_date.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_day_of_year.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_duration_types.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_facet.hpp +27 -7
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_month.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_serialize.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_weekday.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian/greg_year.hpp +4 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/gregorian_calendar.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/local_date_time.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/local_time/posix_time_zone.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/date_time/period.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/date_duration_operators.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_config.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/posix_time_duration.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/ptime.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/date_time/posix_time/time_parsers.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_duration.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_facet.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/date_time/time_zone_base.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/date_time/year_month_day.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/detail/iterator.hpp +13 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/lcast_precision.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/detail/workaround.hpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/error_info_impl.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/detail/shared_ptr.hpp +17 -0
- data/src/cxx_supportlib/vendor-modified/boost/exception/exception.hpp +25 -3
- data/src/cxx_supportlib/vendor-modified/boost/exception/get_error_info.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/exception/info.hpp +114 -1
- data/src/cxx_supportlib/vendor-modified/boost/function/function_base.hpp +116 -142
- data/src/cxx_supportlib/vendor-modified/boost/function/function_template.hpp +57 -69
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/detail/hash_float.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/extensions.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/functional/hash/hash.hpp +27 -13
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/any_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set.hpp +99 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avl_set_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree.hpp +35 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/avltree_algorithms.hpp +37 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set.hpp +95 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bs_set_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree.hpp +209 -72
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/bstree_algorithms.hpp +86 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_list_algorithms.hpp +11 -11
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/circular_slist_algorithms.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/algo_type.hpp +4 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/any_node_and_algorithms.hpp +58 -45
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/avltree_node.hpp +27 -26
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/bstree_algorithms_base.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/common_slist_algorithms.hpp +7 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/config_begin.hpp +8 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/default_header_holder.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/ebo_functor_holder.hpp +27 -26
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/equal_to_value.hpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/exception_disposer.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/generic_hook.hpp +9 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/has_member_function_callable_with.hpp +83 -57
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hashtable_node.hpp +30 -30
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/hook_traits.hpp +9 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iiterator.hpp +8 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/iterator.hpp +16 -15
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/key_nodeptr_comp.hpp +70 -44
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_iterator.hpp +22 -21
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/list_node.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/parent_from_member.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/rbtree_node.hpp +29 -28
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/reverse_iterator.hpp +33 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/size_holder.hpp +19 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_iterator.hpp +21 -20
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/slist_node.hpp +4 -3
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/to_raw_pointer.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/transform_iterator.hpp +23 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_iterator.hpp +23 -22
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_node.hpp +10 -9
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/tree_value_compare.hpp +103 -29
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/detail/workaround.hpp +15 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/hashtable.hpp +295 -211
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/linear_slist_algorithms.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list.hpp +20 -7
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/list_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/member_value_traits.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/options.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/parent_from_member.hpp +3 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_plus_bits.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/pointer_traits.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/priority_compare.hpp +22 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree.hpp +36 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/rbtree_algorithms.hpp +43 -13
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/set.hpp +95 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/set_hook.hpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sg_set.hpp +96 -12
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree.hpp +102 -5
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/sgtree_algorithms.hpp +48 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist.hpp +20 -11
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/slist_hook.hpp +9 -2
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splay_set.hpp +95 -8
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree.hpp +36 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/splaytree_algorithms.hpp +27 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap.hpp +167 -23
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_algorithms.hpp +28 -0
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/treap_set.hpp +100 -46
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/trivial_value_traits.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set.hpp +37 -27
- data/src/cxx_supportlib/vendor-modified/boost/intrusive/unordered_set_hook.hpp +30 -14
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_lexical_streams.hpp +35 -36
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/detail/converter_numeric.hpp +6 -28
- data/src/cxx_supportlib/vendor-modified/boost/lexical_cast/try_lexical_convert.hpp +20 -5
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/posix_api.cpp +4 -2
- data/src/cxx_supportlib/vendor-modified/boost/libs/regex/src/regex.cpp +3 -1
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/once.cpp +5 -0
- data/src/cxx_supportlib/vendor-modified/boost/libs/thread/src/pthread/thread.cpp +11 -7
- data/src/cxx_supportlib/vendor-modified/boost/math/policies/policy.hpp +1 -3
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/fpclassify.hpp +5 -1
- data/src/cxx_supportlib/vendor-modified/boost/math/special_functions/math_fwd.hpp +11 -0
- data/src/cxx_supportlib/vendor-modified/boost/math/tools/config.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/move/adl_move_swap.hpp +40 -7
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_merge.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/adaptive_sort.hpp +63 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/adaptive_sort_merge.hpp +2437 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/basic_op.hpp +121 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/insertion_sort.hpp +127 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge.hpp +637 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/detail/merge_sort.hpp +139 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algo/move.hpp +155 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/algorithm.hpp +1 -116
- data/src/cxx_supportlib/vendor-modified/boost/move/core.hpp +14 -13
- data/src/cxx_supportlib/vendor-modified/boost/move/default_delete.hpp +17 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/config_begin.hpp +2 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/destruct_n.hpp +67 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/fwd_macros.hpp +227 -32
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/iterator_traits.hpp +4 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils.hpp +30 -9
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/meta_utils_core.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/move_helpers.hpp +84 -80
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/placement_new.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/reverse_iterator.hpp +171 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/type_traits.hpp +14 -20
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/unique_ptr_meta_utils.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/detail/workaround.hpp +14 -0
- data/src/cxx_supportlib/vendor-modified/boost/move/iterator.hpp +32 -33
- data/src/cxx_supportlib/vendor-modified/boost/move/make_unique.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/move/unique_ptr.hpp +49 -49
- data/src/cxx_supportlib/vendor-modified/boost/move/utility.hpp +8 -7
- data/src/cxx_supportlib/vendor-modified/boost/move/utility_core.hpp +17 -16
- data/src/cxx_supportlib/vendor-modified/boost/mpl/print.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/none.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/none_t.hpp +2 -3
- data/src/cxx_supportlib/vendor-modified/boost/operators.hpp +197 -255
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp +1059 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_aligned_storage.hpp +75 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_config.hpp +116 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_factory_support.hpp +36 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_reference_spec.hpp +253 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_relops.hpp +196 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_swap.hpp +117 -0
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional.hpp +372 -554
- data/src/cxx_supportlib/vendor-modified/boost/optional/optional_fwd.hpp +12 -1
- data/src/cxx_supportlib/vendor-modified/boost/pool/detail/mutex.hpp +15 -7
- data/src/cxx_supportlib/vendor-modified/boost/pool/pool_alloc.hpp +24 -0
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/intel.h +9 -2
- data/src/cxx_supportlib/vendor-modified/boost/predef/compiler/visualc.h +15 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd.h +16 -4
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86.h +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd.h +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/predef/hardware/simd/x86_amd/versions.h +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/predef/os/cygwin.h +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/predef/version.h +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/predef/version_number.h +20 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/cat.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/config/config.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/binary_transform.hpp +5 -6
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/detail/to_list_msvc.hpp +55 -0
- data/src/cxx_supportlib/vendor-modified/boost/preprocessor/seq/to_list.hpp +12 -0
- data/src/cxx_supportlib/vendor-modified/boost/range/const_iterator.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/range/size_type.hpp +0 -5
- data/src/cxx_supportlib/vendor-modified/boost/regex/concepts.hpp +16 -16
- data/src/cxx_supportlib/vendor-modified/boost/regex/config.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/pending/unicode_iterator.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_creator.hpp +102 -87
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/basic_regex_parser.hpp +45 -21
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/cpp_regex_traits.hpp +4 -4
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/fileiter.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/match_flags.hpp +14 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/mem_block_cache.hpp +46 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher.hpp +5 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_common.hpp +5 -14
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_non_recursive.hpp +116 -13
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/perl_matcher_recursive.hpp +34 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_format.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_traits_defaults.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/regex_workaround.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/regex/v4/w32_regex_traits.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/allocate_shared_array.hpp +1004 -159
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/bad_weak_ptr.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/atomic_count.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/shared_count.hpp +4 -58
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base.hpp +5 -2
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_base_clang.hpp +9 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_counted_impl.hpp +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_has_sync.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_noexcept.hpp +30 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/spinlock.hpp +3 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/enable_shared_from_this.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ptr.hpp +28 -3
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/intrusive_ref_counter.hpp +187 -0
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_array.hpp +52 -144
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/make_shared_object.hpp +120 -450
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_array.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/scoped_ptr.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_array.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/shared_ptr.hpp +70 -8
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/weak_ptr.hpp +6 -5
- data/src/cxx_supportlib/vendor-modified/boost/system/error_code.hpp +9 -8
- data/src/cxx_supportlib/vendor-modified/boost/system/system_error.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/barrier.hpp +5 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/completion_latch.hpp +0 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/queue_views.hpp +0 -11
- data/src/cxx_supportlib/vendor-modified/boost/thread/concurrent_queues/sync_timed_queue.hpp +6 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/config.hpp +11 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/detail/thread.hpp +11 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp +8 -8
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/executor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/generic_executor_ref.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/thread/executors/loop_executor.hpp +22 -18
- data/src/cxx_supportlib/vendor-modified/boost/thread/future.hpp +163 -55
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/launch.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/futures/wait_for_all.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/thread/lock_types.hpp +9 -9
- data/src/cxx_supportlib/vendor-modified/boost/thread/locks.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable.hpp +6 -7
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/condition_variable_fwd.hpp +17 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/shared_mutex.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/thread_data.hpp +5 -5
- data/src/cxx_supportlib/vendor-modified/boost/thread/pthread/timespec.hpp +29 -0
- data/src/cxx_supportlib/vendor-modified/boost/thread/scoped_thread.hpp +23 -18
- data/src/cxx_supportlib/vendor-modified/boost/thread/synchronized_value.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/thread/thread_functors.hpp +19 -4
- data/src/cxx_supportlib/vendor-modified/boost/thread/thread_guard.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/thread/user_scheduler.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_index.hpp +265 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_index/stl_type_index.hpp +272 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_index/type_index_facade.hpp +300 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/add_reference.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/aligned_storage.hpp +6 -6
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/common_type.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/common_arithmetic_type.hpp +9 -3
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/detail/mp_defer.hpp +3 -3
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/extent.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_assign.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_constructor.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_nothrow_destructor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_assign.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_copy.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_destructor.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_assign.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/has_trivial_move_constructor.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_abstract.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_array.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_assignable.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_const.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_default_constructible.hpp +21 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_destructible.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_assignable.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_nothrow_move_constructible.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_pod.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_rvalue_reference.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_virtual_base_of.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/is_volatile.hpp +2 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/make_void.hpp +52 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/rank.hpp +1 -0
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_all_extents.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_const.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_cv.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_extent.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_pointer.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/remove_volatile.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/type_traits/type_with_alignment.hpp +1 -1
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/fwd.hpp +40 -6
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/implementation.hpp +4986 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/map.hpp +107 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/set.hpp +105 -0
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map.hpp +1814 -1255
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_map_fwd.hpp +41 -45
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set.hpp +1498 -1161
- data/src/cxx_supportlib/vendor-modified/boost/unordered/unordered_set_fwd.hpp +40 -44
- data/src/cxx_supportlib/vendor-modified/boost/utility.hpp +2 -2
- data/src/cxx_supportlib/vendor-modified/boost/utility/base_from_member.hpp +7 -6
- data/src/cxx_supportlib/vendor-modified/boost/utility/compare_pointees.hpp +10 -2
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_ref.hpp +39 -22
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_view.hpp +690 -0
- data/src/cxx_supportlib/vendor-modified/boost/utility/string_view_fwd.hpp +39 -0
- data/src/cxx_supportlib/vendor-modified/boost/version.hpp +2 -2
- data/src/helper-scripts/crash-watch.rb +3 -0
- data/src/ruby_supportlib/phusion_passenger.rb +1 -1
- data/src/ruby_supportlib/phusion_passenger/apache2/config_options.rb +1 -0
- data/src/ruby_supportlib/phusion_passenger/packaging.rb +2 -12
- metadata +77 -38
- data/dev/ci/inituidgid +0 -24
- data/dev/ci/run_jenkins.sh +0 -70
- data/dev/ci/run_travis.sh +0 -314
- data/doc/Design and Architecture.html +0 -2421
- data/doc/Design and Architecture.txt +0 -511
- data/doc/Security of user switching support.html +0 -1833
- data/doc/Users guide Apache.html +0 -3101
- data/doc/Users guide Apache.idmap.txt +0 -451
- data/doc/Users guide Apache.txt +0 -534
- data/doc/Users guide Nginx.html +0 -3026
- data/doc/Users guide Nginx.idmap.txt +0 -431
- data/doc/Users guide Nginx.txt +0 -451
- data/doc/Users guide Standalone.html +0 -2092
- data/doc/Users guide Standalone.idmap.txt +0 -137
- data/doc/Users guide Standalone.txt +0 -81
- data/doc/Users guide.html +0 -1606
- data/doc/Users guide.txt +0 -8
- data/src/cxx_supportlib/vendor-modified/boost/align/align.hpp +0 -20
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/address.hpp +0 -29
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/align.hpp +0 -40
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/align_cxx11.hpp +0 -22
- data/src/cxx_supportlib/vendor-modified/boost/align/detail/is_alignment.hpp +0 -29
- data/src/cxx_supportlib/vendor-modified/boost/container/detail/hash_table.hpp +0 -383
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_allocator.hpp +0 -318
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_count_impl.hpp +0 -67
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_traits.hpp +0 -60
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/array_utility.hpp +0 -214
- data/src/cxx_supportlib/vendor-modified/boost/smart_ptr/detail/sp_if_array.hpp +0 -34
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/allocate.hpp +0 -1128
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/buckets.hpp +0 -928
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/equivalent.hpp +0 -686
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/extract_key.hpp +0 -188
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/table.hpp +0 -873
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/unique.hpp +0 -628
- data/src/cxx_supportlib/vendor-modified/boost/unordered/detail/util.hpp +0 -266
@@ -11,53 +11,49 @@
|
|
11
11
|
#pragma once
|
12
12
|
#endif
|
13
13
|
|
14
|
-
#include <memory>
|
15
|
-
#include <functional>
|
16
14
|
#include <boost/functional/hash_fwd.hpp>
|
17
15
|
#include <boost/unordered/detail/fwd.hpp>
|
16
|
+
#include <functional>
|
17
|
+
#include <memory>
|
18
|
+
|
19
|
+
namespace boost {
|
20
|
+
namespace unordered {
|
21
|
+
template <class T, class H = boost::hash<T>, class P = std::equal_to<T>,
|
22
|
+
class A = std::allocator<T> >
|
23
|
+
class unordered_set;
|
24
|
+
|
25
|
+
template <class T, class H, class P, class A>
|
26
|
+
inline bool operator==(
|
27
|
+
unordered_set<T, H, P, A> const&, unordered_set<T, H, P, A> const&);
|
28
|
+
template <class T, class H, class P, class A>
|
29
|
+
inline bool operator!=(
|
30
|
+
unordered_set<T, H, P, A> const&, unordered_set<T, H, P, A> const&);
|
31
|
+
template <class T, class H, class P, class A>
|
32
|
+
inline void swap(unordered_set<T, H, P, A>& m1, unordered_set<T, H, P, A>& m2);
|
33
|
+
|
34
|
+
template <class T, class H = boost::hash<T>, class P = std::equal_to<T>,
|
35
|
+
class A = std::allocator<T> >
|
36
|
+
class unordered_multiset;
|
37
|
+
|
38
|
+
template <class T, class H, class P, class A>
|
39
|
+
inline bool operator==(unordered_multiset<T, H, P, A> const&,
|
40
|
+
unordered_multiset<T, H, P, A> const&);
|
41
|
+
template <class T, class H, class P, class A>
|
42
|
+
inline bool operator!=(unordered_multiset<T, H, P, A> const&,
|
43
|
+
unordered_multiset<T, H, P, A> const&);
|
44
|
+
template <class T, class H, class P, class A>
|
45
|
+
inline void swap(
|
46
|
+
unordered_multiset<T, H, P, A>& m1, unordered_multiset<T, H, P, A>& m2);
|
47
|
+
|
48
|
+
template <class N, class T, class A> class node_handle_set;
|
49
|
+
template <class N, class T, class A> struct insert_return_type_set;
|
50
|
+
}
|
18
51
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
class H = boost::hash<T>,
|
25
|
-
class P = std::equal_to<T>,
|
26
|
-
class A = std::allocator<T> >
|
27
|
-
class unordered_set;
|
28
|
-
|
29
|
-
template <class T, class H, class P, class A>
|
30
|
-
inline bool operator==(unordered_set<T, H, P, A> const&,
|
31
|
-
unordered_set<T, H, P, A> const&);
|
32
|
-
template <class T, class H, class P, class A>
|
33
|
-
inline bool operator!=(unordered_set<T, H, P, A> const&,
|
34
|
-
unordered_set<T, H, P, A> const&);
|
35
|
-
template <class T, class H, class P, class A>
|
36
|
-
inline void swap(unordered_set<T, H, P, A> &m1,
|
37
|
-
unordered_set<T, H, P, A> &m2);
|
38
|
-
|
39
|
-
template <class T,
|
40
|
-
class H = boost::hash<T>,
|
41
|
-
class P = std::equal_to<T>,
|
42
|
-
class A = std::allocator<T> >
|
43
|
-
class unordered_multiset;
|
44
|
-
|
45
|
-
template <class T, class H, class P, class A>
|
46
|
-
inline bool operator==(unordered_multiset<T, H, P, A> const&,
|
47
|
-
unordered_multiset<T, H, P, A> const&);
|
48
|
-
template <class T, class H, class P, class A>
|
49
|
-
inline bool operator!=(unordered_multiset<T, H, P, A> const&,
|
50
|
-
unordered_multiset<T, H, P, A> const&);
|
51
|
-
template <class T, class H, class P, class A>
|
52
|
-
inline void swap(unordered_multiset<T, H, P, A> &m1,
|
53
|
-
unordered_multiset<T, H, P, A> &m2);
|
54
|
-
}
|
55
|
-
|
56
|
-
using boost::unordered::unordered_set;
|
57
|
-
using boost::unordered::unordered_multiset;
|
58
|
-
using boost::unordered::swap;
|
59
|
-
using boost::unordered::operator==;
|
60
|
-
using boost::unordered::operator!=;
|
52
|
+
using boost::unordered::unordered_set;
|
53
|
+
using boost::unordered::unordered_multiset;
|
54
|
+
using boost::unordered::swap;
|
55
|
+
using boost::unordered::operator==;
|
56
|
+
using boost::unordered::operator!=;
|
61
57
|
}
|
62
58
|
|
63
59
|
#endif
|
@@ -14,8 +14,8 @@
|
|
14
14
|
#include <boost/utility/binary.hpp>
|
15
15
|
#include <boost/utility/enable_if.hpp>
|
16
16
|
#include <boost/utility/identity_type.hpp>
|
17
|
-
#include <boost/checked_delete.hpp>
|
17
|
+
#include <boost/core/checked_delete.hpp>
|
18
|
+
#include <boost/core/noncopyable.hpp>
|
18
19
|
#include <boost/next_prior.hpp>
|
19
|
-
#include <boost/noncopyable.hpp>
|
20
20
|
|
21
21
|
#endif // BOOST_UTILITY_HPP
|
@@ -47,11 +47,11 @@
|
|
47
47
|
// {}
|
48
48
|
// This macro should only persist within this file.
|
49
49
|
|
50
|
-
#define BOOST_PRIVATE_CTR_DEF( z, n, data )
|
51
|
-
template < BOOST_PP_ENUM_PARAMS(n, typename T) >
|
52
|
-
|
53
|
-
: member( BOOST_PP_ENUM_PARAMS(n, x) )
|
54
|
-
{}
|
50
|
+
#define BOOST_PRIVATE_CTR_DEF( z, n, data ) \
|
51
|
+
template < BOOST_PP_ENUM_PARAMS(n, typename T) > \
|
52
|
+
base_from_member( BOOST_PP_ENUM_BINARY_PARAMS(n, T, x) ) \
|
53
|
+
: member( BOOST_PP_ENUM_PARAMS(n, x) ) \
|
54
|
+
{} \
|
55
55
|
/**/
|
56
56
|
|
57
57
|
|
@@ -142,7 +142,8 @@ protected:
|
|
142
142
|
: member()
|
143
143
|
{}
|
144
144
|
|
145
|
-
|
145
|
+
template < typename T0 > explicit base_from_member( T0 x0 ) : member( x0 ) {}
|
146
|
+
BOOST_PP_REPEAT_FROM_TO( 2, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),
|
146
147
|
BOOST_PRIVATE_CTR_DEF, _ )
|
147
148
|
#endif
|
148
149
|
|
@@ -33,8 +33,12 @@ bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y )
|
|
33
33
|
}
|
34
34
|
|
35
35
|
template<class OptionalPointee>
|
36
|
-
struct equal_pointees_t
|
36
|
+
struct equal_pointees_t
|
37
37
|
{
|
38
|
+
typedef bool result_type;
|
39
|
+
typedef OptionalPointee first_argument_type;
|
40
|
+
typedef OptionalPointee second_argument_type;
|
41
|
+
|
38
42
|
bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
|
39
43
|
{ return equal_pointees(x,y) ; }
|
40
44
|
} ;
|
@@ -56,8 +60,12 @@ bool less_pointees ( OptionalPointee const& x, OptionalPointee const& y )
|
|
56
60
|
}
|
57
61
|
|
58
62
|
template<class OptionalPointee>
|
59
|
-
struct less_pointees_t
|
63
|
+
struct less_pointees_t
|
60
64
|
{
|
65
|
+
typedef bool result_type;
|
66
|
+
typedef OptionalPointee first_argument_type;
|
67
|
+
typedef OptionalPointee second_argument_type;
|
68
|
+
|
61
69
|
bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
|
62
70
|
{ return less_pointees(x,y) ; }
|
63
71
|
} ;
|
@@ -27,6 +27,11 @@
|
|
27
27
|
#include <string>
|
28
28
|
#include <iosfwd>
|
29
29
|
|
30
|
+
#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
|
31
|
+
// GCC 4.6 cannot handle a defaulted function with noexcept specifier
|
32
|
+
#define BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
|
33
|
+
#endif
|
34
|
+
|
30
35
|
namespace boost {
|
31
36
|
|
32
37
|
namespace detail {
|
@@ -57,26 +62,44 @@ namespace boost {
|
|
57
62
|
static BOOST_CONSTEXPR_OR_CONST size_type npos = size_type(-1);
|
58
63
|
|
59
64
|
// construct/copy
|
60
|
-
BOOST_CONSTEXPR basic_string_ref ()
|
65
|
+
BOOST_CONSTEXPR basic_string_ref () BOOST_NOEXCEPT
|
61
66
|
: ptr_(NULL), len_(0) {}
|
62
67
|
|
63
|
-
|
68
|
+
// by defaulting these functions, basic_string_ref becomes
|
69
|
+
// trivially copy/move constructible.
|
70
|
+
BOOST_CONSTEXPR basic_string_ref (const basic_string_ref &rhs) BOOST_NOEXCEPT
|
71
|
+
#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
|
72
|
+
= default;
|
73
|
+
#else
|
64
74
|
: ptr_(rhs.ptr_), len_(rhs.len_) {}
|
75
|
+
#endif
|
65
76
|
|
66
|
-
basic_string_ref& operator=(const basic_string_ref &rhs)
|
77
|
+
basic_string_ref& operator=(const basic_string_ref &rhs) BOOST_NOEXCEPT
|
78
|
+
#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
|
79
|
+
= default;
|
80
|
+
#else
|
81
|
+
{
|
67
82
|
ptr_ = rhs.ptr_;
|
68
83
|
len_ = rhs.len_;
|
69
84
|
return *this;
|
70
85
|
}
|
86
|
+
#endif
|
71
87
|
|
72
|
-
basic_string_ref(const charT* str)
|
88
|
+
basic_string_ref(const charT* str) BOOST_NOEXCEPT
|
73
89
|
: ptr_(str), len_(traits::length(str)) {}
|
74
90
|
|
75
91
|
template<typename Allocator>
|
76
92
|
basic_string_ref(const std::basic_string<charT, traits, Allocator>& str)
|
77
93
|
: ptr_(str.data()), len_(str.length()) {}
|
78
94
|
|
79
|
-
|
95
|
+
// #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
|
96
|
+
// // Constructing a string_ref from a temporary string is a bad idea
|
97
|
+
// template<typename Allocator>
|
98
|
+
// basic_string_ref( std::basic_string<charT, traits, Allocator>&&)
|
99
|
+
// = delete;
|
100
|
+
// #endif
|
101
|
+
|
102
|
+
BOOST_CONSTEXPR basic_string_ref(const charT* str, size_type len) BOOST_NOEXCEPT
|
80
103
|
: ptr_(str), len_(len) {}
|
81
104
|
|
82
105
|
#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
@@ -139,9 +162,7 @@ namespace boost {
|
|
139
162
|
basic_string_ref substr(size_type pos, size_type n=npos) const {
|
140
163
|
if ( pos > size())
|
141
164
|
BOOST_THROW_EXCEPTION( std::out_of_range ( "string_ref::substr" ) );
|
142
|
-
|
143
|
-
n = size () - pos;
|
144
|
-
return basic_string_ref ( data() + pos, n );
|
165
|
+
return basic_string_ref(data() + pos, (std::min)(size() - pos, n));
|
145
166
|
}
|
146
167
|
|
147
168
|
int compare(basic_string_ref x) const {
|
@@ -174,13 +195,13 @@ namespace boost {
|
|
174
195
|
size_type rfind(basic_string_ref s) const {
|
175
196
|
const_reverse_iterator iter = std::search ( this->crbegin (), this->crend (),
|
176
197
|
s.crbegin (), s.crend (), traits::eq );
|
177
|
-
return iter == this->crend () ? npos :
|
198
|
+
return iter == this->crend () ? npos : (std::distance(iter, this->crend()) - s.size());
|
178
199
|
}
|
179
200
|
|
180
201
|
size_type rfind(charT c) const {
|
181
202
|
const_reverse_iterator iter = std::find_if ( this->crbegin (), this->crend (),
|
182
203
|
detail::string_ref_traits_eq<charT, traits> ( c ));
|
183
|
-
return iter == this->crend () ? npos :
|
204
|
+
return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
|
184
205
|
}
|
185
206
|
|
186
207
|
size_type find_first_of(charT c) const { return find (c); }
|
@@ -195,7 +216,7 @@ namespace boost {
|
|
195
216
|
size_type find_last_of(basic_string_ref s) const {
|
196
217
|
const_reverse_iterator iter = std::find_first_of
|
197
218
|
( this->crbegin (), this->crend (), s.cbegin (), s.cend (), traits::eq );
|
198
|
-
return iter == this->crend () ? npos :
|
219
|
+
return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
|
199
220
|
}
|
200
221
|
|
201
222
|
size_type find_first_not_of(basic_string_ref s) const {
|
@@ -212,21 +233,17 @@ namespace boost {
|
|
212
233
|
|
213
234
|
size_type find_last_not_of(basic_string_ref s) const {
|
214
235
|
const_reverse_iterator iter = find_not_of ( this->crbegin (), this->crend (), s );
|
215
|
-
return iter == this->crend () ? npos :
|
236
|
+
return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
|
216
237
|
}
|
217
238
|
|
218
239
|
size_type find_last_not_of(charT c) const {
|
219
240
|
for ( const_reverse_iterator iter = this->crbegin (); iter != this->crend (); ++iter )
|
220
241
|
if ( !traits::eq ( c, *iter ))
|
221
|
-
return
|
242
|
+
return this->size() - 1 - std::distance(this->crbegin(), iter);
|
222
243
|
return npos;
|
223
244
|
}
|
224
245
|
|
225
246
|
private:
|
226
|
-
template <typename r_iter>
|
227
|
-
size_type reverse_distance ( r_iter first, r_iter last ) const {
|
228
|
-
return len_ - 1 - std::distance ( first, last );
|
229
|
-
}
|
230
247
|
|
231
248
|
template <typename Iterator>
|
232
249
|
Iterator find_not_of ( Iterator first, Iterator last, basic_string_ref s ) const {
|
@@ -405,7 +422,7 @@ namespace boost {
|
|
405
422
|
namespace detail {
|
406
423
|
|
407
424
|
template<class charT, class traits>
|
408
|
-
inline void
|
425
|
+
inline void sr_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
|
409
426
|
enum { chunk_size = 8 };
|
410
427
|
charT fill_chars[chunk_size];
|
411
428
|
std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
|
@@ -416,19 +433,19 @@ namespace boost {
|
|
416
433
|
}
|
417
434
|
|
418
435
|
template<class charT, class traits>
|
419
|
-
void
|
436
|
+
void sr_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
|
420
437
|
const std::size_t size = str.size();
|
421
438
|
const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
|
422
439
|
const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
|
423
440
|
if (!align_left) {
|
424
|
-
detail::
|
441
|
+
detail::sr_insert_fill_chars(os, alignment_size);
|
425
442
|
if (os.good())
|
426
443
|
os.write(str.data(), size);
|
427
444
|
}
|
428
445
|
else {
|
429
446
|
os.write(str.data(), size);
|
430
447
|
if (os.good())
|
431
|
-
detail::
|
448
|
+
detail::sr_insert_fill_chars(os, alignment_size);
|
432
449
|
}
|
433
450
|
}
|
434
451
|
|
@@ -444,7 +461,7 @@ namespace boost {
|
|
444
461
|
if (w <= size)
|
445
462
|
os.write(str.data(), size);
|
446
463
|
else
|
447
|
-
detail::
|
464
|
+
detail::sr_insert_aligned(os, str);
|
448
465
|
os.width(0);
|
449
466
|
}
|
450
467
|
return os;
|
@@ -0,0 +1,690 @@
|
|
1
|
+
/*
|
2
|
+
Copyright (c) Marshall Clow 2012-2015.
|
3
|
+
Copyright (c) Beman Dawes 2015
|
4
|
+
|
5
|
+
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
6
|
+
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
7
|
+
|
8
|
+
For more information, see http://www.boost.org
|
9
|
+
|
10
|
+
Based on the StringRef implementation in LLVM (http://llvm.org) and
|
11
|
+
N3422 by Jeffrey Yasskin
|
12
|
+
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html
|
13
|
+
Updated July 2015 to reflect the Library Fundamentals TS
|
14
|
+
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html
|
15
|
+
*/
|
16
|
+
|
17
|
+
#ifndef BOOST_STRING_VIEW_HPP
|
18
|
+
#define BOOST_STRING_VIEW_HPP
|
19
|
+
|
20
|
+
#include <boost/config.hpp>
|
21
|
+
#include <boost/detail/workaround.hpp>
|
22
|
+
#include <boost/utility/string_view_fwd.hpp>
|
23
|
+
#include <boost/throw_exception.hpp>
|
24
|
+
|
25
|
+
#include <cstddef>
|
26
|
+
#include <stdexcept>
|
27
|
+
#include <algorithm>
|
28
|
+
#include <iterator>
|
29
|
+
#include <string>
|
30
|
+
#include <cstring>
|
31
|
+
#include <iosfwd>
|
32
|
+
|
33
|
+
#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
|
34
|
+
// GCC 4.6 cannot handle a defaulted function with noexcept specifier
|
35
|
+
#define BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
|
36
|
+
#endif
|
37
|
+
|
38
|
+
namespace boost {
|
39
|
+
|
40
|
+
namespace detail {
|
41
|
+
// A helper functor because sometimes we don't have lambdas
|
42
|
+
template <typename charT, typename traits>
|
43
|
+
class string_view_traits_eq {
|
44
|
+
public:
|
45
|
+
string_view_traits_eq ( charT ch ) : ch_(ch) {}
|
46
|
+
bool operator()( charT val ) const { return traits::eq (ch_, val); }
|
47
|
+
charT ch_;
|
48
|
+
};
|
49
|
+
}
|
50
|
+
|
51
|
+
template<typename charT, typename traits> // traits defaulted in string_view_fwd.hpp
|
52
|
+
class basic_string_view {
|
53
|
+
public:
|
54
|
+
// types
|
55
|
+
typedef traits traits_type;
|
56
|
+
typedef charT value_type;
|
57
|
+
typedef charT* pointer;
|
58
|
+
typedef const charT* const_pointer;
|
59
|
+
typedef charT& reference;
|
60
|
+
typedef const charT& const_reference;
|
61
|
+
typedef const_pointer const_iterator; // impl-defined
|
62
|
+
typedef const_iterator iterator;
|
63
|
+
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
64
|
+
typedef const_reverse_iterator reverse_iterator;
|
65
|
+
typedef std::size_t size_type;
|
66
|
+
typedef std::ptrdiff_t difference_type;
|
67
|
+
static BOOST_CONSTEXPR_OR_CONST size_type npos = size_type(-1);
|
68
|
+
|
69
|
+
// construct/copy
|
70
|
+
BOOST_CONSTEXPR basic_string_view() BOOST_NOEXCEPT
|
71
|
+
: ptr_(NULL), len_(0) {}
|
72
|
+
|
73
|
+
// by defaulting these functions, basic_string_ref becomes
|
74
|
+
// trivially copy/move constructible.
|
75
|
+
BOOST_CONSTEXPR basic_string_view(const basic_string_view &rhs) BOOST_NOEXCEPT
|
76
|
+
#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
|
77
|
+
= default;
|
78
|
+
#else
|
79
|
+
: ptr_(rhs.ptr_), len_(rhs.len_) {}
|
80
|
+
#endif
|
81
|
+
|
82
|
+
basic_string_view& operator=(const basic_string_view &rhs) BOOST_NOEXCEPT
|
83
|
+
#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
|
84
|
+
= default;
|
85
|
+
#else
|
86
|
+
{
|
87
|
+
ptr_ = rhs.ptr_;
|
88
|
+
len_ = rhs.len_;
|
89
|
+
return *this;
|
90
|
+
}
|
91
|
+
#endif
|
92
|
+
|
93
|
+
template<typename Allocator>
|
94
|
+
basic_string_view(const std::basic_string<charT, traits, Allocator>& str) BOOST_NOEXCEPT
|
95
|
+
: ptr_(str.data()), len_(str.length()) {}
|
96
|
+
|
97
|
+
// #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
|
98
|
+
// // Constructing a string_view from a temporary string is a bad idea
|
99
|
+
// template<typename Allocator>
|
100
|
+
// basic_string_view( std::basic_string<charT, traits, Allocator>&&)
|
101
|
+
// = delete;
|
102
|
+
// #endif
|
103
|
+
|
104
|
+
BOOST_CONSTEXPR basic_string_view(const charT* str)
|
105
|
+
: ptr_(str), len_(traits::length(str)) {}
|
106
|
+
|
107
|
+
BOOST_CONSTEXPR basic_string_view(const charT* str, size_type len)
|
108
|
+
: ptr_(str), len_(len) {}
|
109
|
+
|
110
|
+
// iterators
|
111
|
+
BOOST_CONSTEXPR const_iterator begin() const BOOST_NOEXCEPT { return ptr_; }
|
112
|
+
BOOST_CONSTEXPR const_iterator cbegin() const BOOST_NOEXCEPT { return ptr_; }
|
113
|
+
BOOST_CONSTEXPR const_iterator end() const BOOST_NOEXCEPT { return ptr_ + len_; }
|
114
|
+
BOOST_CONSTEXPR const_iterator cend() const BOOST_NOEXCEPT { return ptr_ + len_; }
|
115
|
+
const_reverse_iterator rbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(end()); }
|
116
|
+
const_reverse_iterator crbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(end()); }
|
117
|
+
const_reverse_iterator rend() const BOOST_NOEXCEPT { return const_reverse_iterator(begin()); }
|
118
|
+
const_reverse_iterator crend() const BOOST_NOEXCEPT { return const_reverse_iterator(begin()); }
|
119
|
+
|
120
|
+
// capacity
|
121
|
+
BOOST_CONSTEXPR size_type size() const BOOST_NOEXCEPT { return len_; }
|
122
|
+
BOOST_CONSTEXPR size_type length() const BOOST_NOEXCEPT { return len_; }
|
123
|
+
BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT { return len_; }
|
124
|
+
BOOST_CONSTEXPR bool empty() const BOOST_NOEXCEPT { return len_ == 0; }
|
125
|
+
|
126
|
+
// element access
|
127
|
+
BOOST_CONSTEXPR const_reference operator[](size_type pos) const BOOST_NOEXCEPT { return ptr_[pos]; }
|
128
|
+
|
129
|
+
BOOST_CONSTEXPR const_reference at(size_t pos) const {
|
130
|
+
return pos >= len_ ? BOOST_THROW_EXCEPTION(std::out_of_range("boost::string_view::at")), ptr_[0] : ptr_[pos];
|
131
|
+
}
|
132
|
+
|
133
|
+
BOOST_CONSTEXPR const_reference front() const { return ptr_[0]; }
|
134
|
+
BOOST_CONSTEXPR const_reference back() const { return ptr_[len_-1]; }
|
135
|
+
BOOST_CONSTEXPR const_pointer data() const BOOST_NOEXCEPT { return ptr_; }
|
136
|
+
|
137
|
+
// modifiers
|
138
|
+
void clear() BOOST_NOEXCEPT { len_ = 0; } // Boost extension
|
139
|
+
|
140
|
+
BOOST_CXX14_CONSTEXPR void remove_prefix(size_type n) {
|
141
|
+
if ( n > len_ )
|
142
|
+
n = len_;
|
143
|
+
ptr_ += n;
|
144
|
+
len_ -= n;
|
145
|
+
}
|
146
|
+
|
147
|
+
BOOST_CXX14_CONSTEXPR void remove_suffix(size_type n) {
|
148
|
+
if ( n > len_ )
|
149
|
+
n = len_;
|
150
|
+
len_ -= n;
|
151
|
+
}
|
152
|
+
|
153
|
+
BOOST_CXX14_CONSTEXPR void swap(basic_string_view& s) BOOST_NOEXCEPT {
|
154
|
+
std::swap(ptr_, s.ptr_);
|
155
|
+
std::swap(len_, s.len_);
|
156
|
+
}
|
157
|
+
|
158
|
+
// basic_string_view string operations
|
159
|
+
#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
160
|
+
template<typename Allocator>
|
161
|
+
explicit operator std::basic_string<charT, traits, Allocator>() const {
|
162
|
+
return std::basic_string<charT, traits, Allocator>(begin(), end());
|
163
|
+
}
|
164
|
+
#endif
|
165
|
+
|
166
|
+
#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
167
|
+
template<typename Allocator = std::allocator<charT> >
|
168
|
+
std::basic_string<charT, traits, Allocator> to_string(const Allocator& a = Allocator()) const {
|
169
|
+
return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
|
170
|
+
}
|
171
|
+
#else
|
172
|
+
std::basic_string<charT, traits> to_string() const {
|
173
|
+
return std::basic_string<charT, traits>(begin(), end());
|
174
|
+
}
|
175
|
+
|
176
|
+
template<typename Allocator>
|
177
|
+
std::basic_string<charT, traits, Allocator> to_string(const Allocator& a) const {
|
178
|
+
return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
|
179
|
+
}
|
180
|
+
#endif
|
181
|
+
|
182
|
+
size_type copy(charT* s, size_type n, size_type pos=0) const {
|
183
|
+
if (pos > size())
|
184
|
+
BOOST_THROW_EXCEPTION(std::out_of_range("string_view::copy" ));
|
185
|
+
size_type rlen = (std::min)(n, len_ - pos);
|
186
|
+
traits_type::copy(s, data() + pos, rlen);
|
187
|
+
return rlen;
|
188
|
+
}
|
189
|
+
|
190
|
+
BOOST_CXX14_CONSTEXPR basic_string_view substr(size_type pos, size_type n=npos) const {
|
191
|
+
if ( pos > size())
|
192
|
+
BOOST_THROW_EXCEPTION( std::out_of_range ( "string_view::substr" ) );
|
193
|
+
return basic_string_view(data() + pos, (std::min)(size() - pos, n));
|
194
|
+
}
|
195
|
+
|
196
|
+
BOOST_CXX14_CONSTEXPR int compare(basic_string_view x) const BOOST_NOEXCEPT {
|
197
|
+
const int cmp = traits::compare(ptr_, x.ptr_, (std::min)(len_, x.len_));
|
198
|
+
return cmp != 0 ? cmp : (len_ == x.len_ ? 0 : len_ < x.len_ ? -1 : 1);
|
199
|
+
}
|
200
|
+
|
201
|
+
BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1, basic_string_view x)
|
202
|
+
const BOOST_NOEXCEPT {
|
203
|
+
return substr(pos1, n1).compare(x);
|
204
|
+
}
|
205
|
+
|
206
|
+
BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1,
|
207
|
+
basic_string_view x, size_type pos2, size_type n2) const {
|
208
|
+
return substr(pos1, n1).compare(x.substr(pos2, n2));
|
209
|
+
}
|
210
|
+
|
211
|
+
BOOST_CXX14_CONSTEXPR int compare(const charT* x) const {
|
212
|
+
return compare(basic_string_view(x));
|
213
|
+
}
|
214
|
+
|
215
|
+
BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1, const charT* x) const {
|
216
|
+
return substr(pos1, n1).compare(basic_string_view(x));
|
217
|
+
}
|
218
|
+
|
219
|
+
BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1,
|
220
|
+
const charT* x, size_type n2) const {
|
221
|
+
return substr(pos1, n1).compare(basic_string_view(x, n2));
|
222
|
+
}
|
223
|
+
|
224
|
+
// Searches
|
225
|
+
BOOST_CONSTEXPR bool starts_with(charT c) const BOOST_NOEXCEPT { // Boost extension
|
226
|
+
return !empty() && traits::eq(c, front());
|
227
|
+
}
|
228
|
+
|
229
|
+
BOOST_CONSTEXPR bool starts_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
|
230
|
+
return len_ >= x.len_ && traits::compare(ptr_, x.ptr_, x.len_) == 0;
|
231
|
+
}
|
232
|
+
|
233
|
+
BOOST_CONSTEXPR bool ends_with(charT c) const BOOST_NOEXCEPT { // Boost extension
|
234
|
+
return !empty() && traits::eq(c, back());
|
235
|
+
}
|
236
|
+
|
237
|
+
BOOST_CONSTEXPR bool ends_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
|
238
|
+
return len_ >= x.len_ &&
|
239
|
+
traits::compare(ptr_ + len_ - x.len_, x.ptr_, x.len_) == 0;
|
240
|
+
}
|
241
|
+
|
242
|
+
// find
|
243
|
+
BOOST_CXX14_CONSTEXPR size_type find(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
244
|
+
if (pos > size())
|
245
|
+
return npos;
|
246
|
+
if (s.empty())
|
247
|
+
return pos;
|
248
|
+
const_iterator iter = std::search(this->cbegin() + pos, this->cend(),
|
249
|
+
s.cbegin (), s.cend (), traits::eq);
|
250
|
+
return iter == this->cend () ? npos : std::distance(this->cbegin (), iter);
|
251
|
+
}
|
252
|
+
BOOST_CXX14_CONSTEXPR size_type find(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
253
|
+
{ return find(basic_string_view(&c, 1), pos); }
|
254
|
+
BOOST_CXX14_CONSTEXPR size_type find(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
|
255
|
+
{ return find(basic_string_view(s, n), pos); }
|
256
|
+
BOOST_CXX14_CONSTEXPR size_type find(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
|
257
|
+
{ return find(basic_string_view(s), pos); }
|
258
|
+
|
259
|
+
// rfind
|
260
|
+
BOOST_CXX14_CONSTEXPR size_type rfind(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
|
261
|
+
if (len_ < s.len_)
|
262
|
+
return npos;
|
263
|
+
if (pos > len_ - s.len_)
|
264
|
+
pos = len_ - s.len_;
|
265
|
+
if (s.len_ == 0u) // an empty string is always found
|
266
|
+
return pos;
|
267
|
+
for (const charT* cur = ptr_ + pos; ; --cur) {
|
268
|
+
if (traits::compare(cur, s.ptr_, s.len_) == 0)
|
269
|
+
return cur - ptr_;
|
270
|
+
if (cur == ptr_)
|
271
|
+
return npos;
|
272
|
+
};
|
273
|
+
}
|
274
|
+
BOOST_CXX14_CONSTEXPR size_type rfind(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
275
|
+
{ return rfind(basic_string_view(&c, 1), pos); }
|
276
|
+
BOOST_CXX14_CONSTEXPR size_type rfind(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
|
277
|
+
{ return rfind(basic_string_view(s, n), pos); }
|
278
|
+
BOOST_CXX14_CONSTEXPR size_type rfind(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
|
279
|
+
{ return rfind(basic_string_view(s), pos); }
|
280
|
+
|
281
|
+
// find_first_of
|
282
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
283
|
+
if (pos >= len_ || s.len_ == 0)
|
284
|
+
return npos;
|
285
|
+
const_iterator iter = std::find_first_of
|
286
|
+
(this->cbegin () + pos, this->cend (), s.cbegin (), s.cend (), traits::eq);
|
287
|
+
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
288
|
+
}
|
289
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
290
|
+
{ return find_first_of(basic_string_view(&c, 1), pos); }
|
291
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
|
292
|
+
{ return find_first_of(basic_string_view(s, n), pos); }
|
293
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_of(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
|
294
|
+
{ return find_first_of(basic_string_view(s), pos); }
|
295
|
+
|
296
|
+
// find_last_of
|
297
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
|
298
|
+
if (s.len_ == 0u)
|
299
|
+
return npos;
|
300
|
+
if (pos >= len_)
|
301
|
+
pos = 0;
|
302
|
+
else
|
303
|
+
pos = len_ - (pos+1);
|
304
|
+
const_reverse_iterator iter = std::find_first_of
|
305
|
+
( this->crbegin () + pos, this->crend (), s.cbegin (), s.cend (), traits::eq );
|
306
|
+
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter);
|
307
|
+
}
|
308
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
309
|
+
{ return find_last_of(basic_string_view(&c, 1), pos); }
|
310
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
|
311
|
+
{ return find_last_of(basic_string_view(s, n), pos); }
|
312
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_of(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
|
313
|
+
{ return find_last_of(basic_string_view(s), pos); }
|
314
|
+
|
315
|
+
// find_first_not_of
|
316
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_not_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
|
317
|
+
if (pos >= len_)
|
318
|
+
return npos;
|
319
|
+
if (s.len_ == 0)
|
320
|
+
return pos;
|
321
|
+
const_iterator iter = find_not_of ( this->cbegin () + pos, this->cend (), s );
|
322
|
+
return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
|
323
|
+
}
|
324
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_not_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
|
325
|
+
{ return find_first_not_of(basic_string_view(&c, 1), pos); }
|
326
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
|
327
|
+
{ return find_first_not_of(basic_string_view(s, n), pos); }
|
328
|
+
BOOST_CXX14_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
|
329
|
+
{ return find_first_not_of(basic_string_view(s), pos); }
|
330
|
+
|
331
|
+
// find_last_not_of
|
332
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_not_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
|
333
|
+
if (pos >= len_)
|
334
|
+
pos = len_ - 1;
|
335
|
+
if (s.len_ == 0u)
|
336
|
+
return pos;
|
337
|
+
pos = len_ - (pos+1);
|
338
|
+
const_reverse_iterator iter = find_not_of ( this->crbegin () + pos, this->crend (), s );
|
339
|
+
return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
|
340
|
+
}
|
341
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_not_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
|
342
|
+
{ return find_last_not_of(basic_string_view(&c, 1), pos); }
|
343
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
|
344
|
+
{ return find_last_not_of(basic_string_view(s, n), pos); }
|
345
|
+
BOOST_CXX14_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
|
346
|
+
{ return find_last_not_of(basic_string_view(s), pos); }
|
347
|
+
|
348
|
+
private:
|
349
|
+
template <typename r_iter>
|
350
|
+
size_type reverse_distance(r_iter first, r_iter last) const BOOST_NOEXCEPT {
|
351
|
+
// Portability note here: std::distance is not NOEXCEPT, but calling it with a string_view::reverse_iterator will not throw.
|
352
|
+
return len_ - 1 - std::distance ( first, last );
|
353
|
+
}
|
354
|
+
|
355
|
+
template <typename Iterator>
|
356
|
+
Iterator find_not_of(Iterator first, Iterator last, basic_string_view s) const BOOST_NOEXCEPT {
|
357
|
+
for (; first != last ; ++first)
|
358
|
+
if ( 0 == traits::find(s.ptr_, s.len_, *first))
|
359
|
+
return first;
|
360
|
+
return last;
|
361
|
+
}
|
362
|
+
|
363
|
+
const charT *ptr_;
|
364
|
+
std::size_t len_;
|
365
|
+
};
|
366
|
+
|
367
|
+
|
368
|
+
// Comparison operators
|
369
|
+
// Equality
|
370
|
+
template<typename charT, typename traits>
|
371
|
+
inline bool operator==(basic_string_view<charT, traits> x,
|
372
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
373
|
+
if (x.size () != y.size ()) return false;
|
374
|
+
return x.compare(y) == 0;
|
375
|
+
}
|
376
|
+
|
377
|
+
// Inequality
|
378
|
+
template<typename charT, typename traits>
|
379
|
+
inline bool operator!=(basic_string_view<charT, traits> x,
|
380
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
381
|
+
if ( x.size () != y.size ()) return true;
|
382
|
+
return x.compare(y) != 0;
|
383
|
+
}
|
384
|
+
|
385
|
+
// Less than
|
386
|
+
template<typename charT, typename traits>
|
387
|
+
inline bool operator<(basic_string_view<charT, traits> x,
|
388
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
389
|
+
return x.compare(y) < 0;
|
390
|
+
}
|
391
|
+
|
392
|
+
// Greater than
|
393
|
+
template<typename charT, typename traits>
|
394
|
+
inline bool operator>(basic_string_view<charT, traits> x,
|
395
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
396
|
+
return x.compare(y) > 0;
|
397
|
+
}
|
398
|
+
|
399
|
+
// Less than or equal to
|
400
|
+
template<typename charT, typename traits>
|
401
|
+
inline bool operator<=(basic_string_view<charT, traits> x,
|
402
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
403
|
+
return x.compare(y) <= 0;
|
404
|
+
}
|
405
|
+
|
406
|
+
// Greater than or equal to
|
407
|
+
template<typename charT, typename traits>
|
408
|
+
inline bool operator>=(basic_string_view<charT, traits> x,
|
409
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
410
|
+
return x.compare(y) >= 0;
|
411
|
+
}
|
412
|
+
|
413
|
+
// "sufficient additional overloads of comparison functions"
|
414
|
+
template<typename charT, typename traits, typename Allocator>
|
415
|
+
inline bool operator==(basic_string_view<charT, traits> x,
|
416
|
+
const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
|
417
|
+
return x == basic_string_view<charT, traits>(y);
|
418
|
+
}
|
419
|
+
|
420
|
+
template<typename charT, typename traits, typename Allocator>
|
421
|
+
inline bool operator==(const std::basic_string<charT, traits, Allocator> & x,
|
422
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
423
|
+
return basic_string_view<charT, traits>(x) == y;
|
424
|
+
}
|
425
|
+
|
426
|
+
template<typename charT, typename traits>
|
427
|
+
inline bool operator==(basic_string_view<charT, traits> x,
|
428
|
+
const charT * y) BOOST_NOEXCEPT {
|
429
|
+
return x == basic_string_view<charT, traits>(y);
|
430
|
+
}
|
431
|
+
|
432
|
+
template<typename charT, typename traits>
|
433
|
+
inline bool operator==(const charT * x,
|
434
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
435
|
+
return basic_string_view<charT, traits>(x) == y;
|
436
|
+
}
|
437
|
+
|
438
|
+
template<typename charT, typename traits, typename Allocator>
|
439
|
+
inline bool operator!=(basic_string_view<charT, traits> x,
|
440
|
+
const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
|
441
|
+
return x != basic_string_view<charT, traits>(y);
|
442
|
+
}
|
443
|
+
|
444
|
+
template<typename charT, typename traits, typename Allocator>
|
445
|
+
inline bool operator!=(const std::basic_string<charT, traits, Allocator> & x,
|
446
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
447
|
+
return basic_string_view<charT, traits>(x) != y;
|
448
|
+
}
|
449
|
+
|
450
|
+
template<typename charT, typename traits>
|
451
|
+
inline bool operator!=(basic_string_view<charT, traits> x,
|
452
|
+
const charT * y) BOOST_NOEXCEPT {
|
453
|
+
return x != basic_string_view<charT, traits>(y);
|
454
|
+
}
|
455
|
+
|
456
|
+
template<typename charT, typename traits>
|
457
|
+
inline bool operator!=(const charT * x,
|
458
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
459
|
+
return basic_string_view<charT, traits>(x) != y;
|
460
|
+
}
|
461
|
+
|
462
|
+
template<typename charT, typename traits, typename Allocator>
|
463
|
+
inline bool operator<(basic_string_view<charT, traits> x,
|
464
|
+
const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
|
465
|
+
return x < basic_string_view<charT, traits>(y);
|
466
|
+
}
|
467
|
+
|
468
|
+
template<typename charT, typename traits, typename Allocator>
|
469
|
+
inline bool operator<(const std::basic_string<charT, traits, Allocator> & x,
|
470
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
471
|
+
return basic_string_view<charT, traits>(x) < y;
|
472
|
+
}
|
473
|
+
|
474
|
+
template<typename charT, typename traits>
|
475
|
+
inline bool operator<(basic_string_view<charT, traits> x,
|
476
|
+
const charT * y) BOOST_NOEXCEPT {
|
477
|
+
return x < basic_string_view<charT, traits>(y);
|
478
|
+
}
|
479
|
+
|
480
|
+
template<typename charT, typename traits>
|
481
|
+
inline bool operator<(const charT * x,
|
482
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
483
|
+
return basic_string_view<charT, traits>(x) < y;
|
484
|
+
}
|
485
|
+
|
486
|
+
template<typename charT, typename traits, typename Allocator>
|
487
|
+
inline bool operator>(basic_string_view<charT, traits> x,
|
488
|
+
const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
|
489
|
+
return x > basic_string_view<charT, traits>(y);
|
490
|
+
}
|
491
|
+
|
492
|
+
template<typename charT, typename traits, typename Allocator>
|
493
|
+
inline bool operator>(const std::basic_string<charT, traits, Allocator> & x,
|
494
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
495
|
+
return basic_string_view<charT, traits>(x) > y;
|
496
|
+
}
|
497
|
+
|
498
|
+
template<typename charT, typename traits>
|
499
|
+
inline bool operator>(basic_string_view<charT, traits> x,
|
500
|
+
const charT * y) BOOST_NOEXCEPT {
|
501
|
+
return x > basic_string_view<charT, traits>(y);
|
502
|
+
}
|
503
|
+
|
504
|
+
template<typename charT, typename traits>
|
505
|
+
inline bool operator>(const charT * x,
|
506
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
507
|
+
return basic_string_view<charT, traits>(x) > y;
|
508
|
+
}
|
509
|
+
|
510
|
+
template<typename charT, typename traits, typename Allocator>
|
511
|
+
inline bool operator<=(basic_string_view<charT, traits> x,
|
512
|
+
const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
|
513
|
+
return x <= basic_string_view<charT, traits>(y);
|
514
|
+
}
|
515
|
+
|
516
|
+
template<typename charT, typename traits, typename Allocator>
|
517
|
+
inline bool operator<=(const std::basic_string<charT, traits, Allocator> & x,
|
518
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
519
|
+
return basic_string_view<charT, traits>(x) <= y;
|
520
|
+
}
|
521
|
+
|
522
|
+
template<typename charT, typename traits>
|
523
|
+
inline bool operator<=(basic_string_view<charT, traits> x,
|
524
|
+
const charT * y) BOOST_NOEXCEPT {
|
525
|
+
return x <= basic_string_view<charT, traits>(y);
|
526
|
+
}
|
527
|
+
|
528
|
+
template<typename charT, typename traits>
|
529
|
+
inline bool operator<=(const charT * x,
|
530
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
531
|
+
return basic_string_view<charT, traits>(x) <= y;
|
532
|
+
}
|
533
|
+
|
534
|
+
template<typename charT, typename traits, typename Allocator>
|
535
|
+
inline bool operator>=(basic_string_view<charT, traits> x,
|
536
|
+
const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
|
537
|
+
return x >= basic_string_view<charT, traits>(y);
|
538
|
+
}
|
539
|
+
|
540
|
+
template<typename charT, typename traits, typename Allocator>
|
541
|
+
inline bool operator>=(const std::basic_string<charT, traits, Allocator> & x,
|
542
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
543
|
+
return basic_string_view<charT, traits>(x) >= y;
|
544
|
+
}
|
545
|
+
|
546
|
+
template<typename charT, typename traits>
|
547
|
+
inline bool operator>=(basic_string_view<charT, traits> x,
|
548
|
+
const charT * y) BOOST_NOEXCEPT {
|
549
|
+
return x >= basic_string_view<charT, traits>(y);
|
550
|
+
}
|
551
|
+
|
552
|
+
template<typename charT, typename traits>
|
553
|
+
inline bool operator>=(const charT * x,
|
554
|
+
basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
|
555
|
+
return basic_string_view<charT, traits>(x) >= y;
|
556
|
+
}
|
557
|
+
|
558
|
+
namespace detail {
|
559
|
+
|
560
|
+
template<class charT, class traits>
|
561
|
+
inline void sv_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
|
562
|
+
enum { chunk_size = 8 };
|
563
|
+
charT fill_chars[chunk_size];
|
564
|
+
std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
|
565
|
+
for (; n >= chunk_size && os.good(); n -= chunk_size)
|
566
|
+
os.write(fill_chars, static_cast< std::size_t >(chunk_size));
|
567
|
+
if (n > 0 && os.good())
|
568
|
+
os.write(fill_chars, n);
|
569
|
+
}
|
570
|
+
|
571
|
+
template<class charT, class traits>
|
572
|
+
void sv_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_view<charT,traits>& str) {
|
573
|
+
const std::size_t size = str.size();
|
574
|
+
const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
|
575
|
+
const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
|
576
|
+
if (!align_left) {
|
577
|
+
detail::sv_insert_fill_chars(os, alignment_size);
|
578
|
+
if (os.good())
|
579
|
+
os.write(str.data(), size);
|
580
|
+
}
|
581
|
+
else {
|
582
|
+
os.write(str.data(), size);
|
583
|
+
if (os.good())
|
584
|
+
detail::sv_insert_fill_chars(os, alignment_size);
|
585
|
+
}
|
586
|
+
}
|
587
|
+
|
588
|
+
} // namespace detail
|
589
|
+
|
590
|
+
// Inserter
|
591
|
+
template<class charT, class traits>
|
592
|
+
inline std::basic_ostream<charT, traits>&
|
593
|
+
operator<<(std::basic_ostream<charT, traits>& os,
|
594
|
+
const basic_string_view<charT,traits>& str) {
|
595
|
+
if (os.good()) {
|
596
|
+
const std::size_t size = str.size();
|
597
|
+
const std::size_t w = static_cast< std::size_t >(os.width());
|
598
|
+
if (w <= size)
|
599
|
+
os.write(str.data(), size);
|
600
|
+
else
|
601
|
+
detail::sv_insert_aligned(os, str);
|
602
|
+
os.width(0);
|
603
|
+
}
|
604
|
+
return os;
|
605
|
+
}
|
606
|
+
|
607
|
+
#if 0
|
608
|
+
// numeric conversions
|
609
|
+
//
|
610
|
+
// These are short-term implementations.
|
611
|
+
// In a production environment, I would rather avoid the copying.
|
612
|
+
//
|
613
|
+
inline int stoi (string_view str, size_t* idx=0, int base=10) {
|
614
|
+
return std::stoi ( std::string(str), idx, base );
|
615
|
+
}
|
616
|
+
|
617
|
+
inline long stol (string_view str, size_t* idx=0, int base=10) {
|
618
|
+
return std::stol ( std::string(str), idx, base );
|
619
|
+
}
|
620
|
+
|
621
|
+
inline unsigned long stoul (string_view str, size_t* idx=0, int base=10) {
|
622
|
+
return std::stoul ( std::string(str), idx, base );
|
623
|
+
}
|
624
|
+
|
625
|
+
inline long long stoll (string_view str, size_t* idx=0, int base=10) {
|
626
|
+
return std::stoll ( std::string(str), idx, base );
|
627
|
+
}
|
628
|
+
|
629
|
+
inline unsigned long long stoull (string_view str, size_t* idx=0, int base=10) {
|
630
|
+
return std::stoull ( std::string(str), idx, base );
|
631
|
+
}
|
632
|
+
|
633
|
+
inline float stof (string_view str, size_t* idx=0) {
|
634
|
+
return std::stof ( std::string(str), idx );
|
635
|
+
}
|
636
|
+
|
637
|
+
inline double stod (string_view str, size_t* idx=0) {
|
638
|
+
return std::stod ( std::string(str), idx );
|
639
|
+
}
|
640
|
+
|
641
|
+
inline long double stold (string_view str, size_t* idx=0) {
|
642
|
+
return std::stold ( std::string(str), idx );
|
643
|
+
}
|
644
|
+
|
645
|
+
inline int stoi (wstring_view str, size_t* idx=0, int base=10) {
|
646
|
+
return std::stoi ( std::wstring(str), idx, base );
|
647
|
+
}
|
648
|
+
|
649
|
+
inline long stol (wstring_view str, size_t* idx=0, int base=10) {
|
650
|
+
return std::stol ( std::wstring(str), idx, base );
|
651
|
+
}
|
652
|
+
|
653
|
+
inline unsigned long stoul (wstring_view str, size_t* idx=0, int base=10) {
|
654
|
+
return std::stoul ( std::wstring(str), idx, base );
|
655
|
+
}
|
656
|
+
|
657
|
+
inline long long stoll (wstring_view str, size_t* idx=0, int base=10) {
|
658
|
+
return std::stoll ( std::wstring(str), idx, base );
|
659
|
+
}
|
660
|
+
|
661
|
+
inline unsigned long long stoull (wstring_view str, size_t* idx=0, int base=10) {
|
662
|
+
return std::stoull ( std::wstring(str), idx, base );
|
663
|
+
}
|
664
|
+
|
665
|
+
inline float stof (wstring_view str, size_t* idx=0) {
|
666
|
+
return std::stof ( std::wstring(str), idx );
|
667
|
+
}
|
668
|
+
|
669
|
+
inline double stod (wstring_view str, size_t* idx=0) {
|
670
|
+
return std::stod ( std::wstring(str), idx );
|
671
|
+
}
|
672
|
+
|
673
|
+
inline long double stold (wstring_view str, size_t* idx=0) {
|
674
|
+
return std::stold ( std::wstring(str), idx );
|
675
|
+
}
|
676
|
+
#endif
|
677
|
+
|
678
|
+
}
|
679
|
+
|
680
|
+
#if 0
|
681
|
+
namespace std {
|
682
|
+
// Hashing
|
683
|
+
template<> struct hash<boost::string_view>;
|
684
|
+
template<> struct hash<boost::u16string_view>;
|
685
|
+
template<> struct hash<boost::u32string_view>;
|
686
|
+
template<> struct hash<boost::wstring_view>;
|
687
|
+
}
|
688
|
+
#endif
|
689
|
+
|
690
|
+
#endif
|