passenger 6.0.0 → 6.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +148 -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 +1 -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 +13 -1
- data/src/agent/Core/Controller.h +1 -0
- data/src/agent/Core/Controller/Config.h +4 -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/Perform.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 +14 -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 +57 -2
- 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 +9 -5
- 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 +48 -7
- 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
@@ -184,16 +184,27 @@ template< typename P > struct assert_arg_pred_not
|
|
184
184
|
typedef typename assert_arg_pred_impl<p>::type type;
|
185
185
|
};
|
186
186
|
|
187
|
+
#if defined(BOOST_GCC) && BOOST_GCC >= 80000
|
188
|
+
#define BOOST_MPL_IGNORE_PARENTHESES_WARNING
|
189
|
+
#pragma GCC diagnostic push
|
190
|
+
#pragma GCC diagnostic ignored "-Wparentheses"
|
191
|
+
#endif
|
192
|
+
|
187
193
|
template< typename Pred >
|
188
|
-
failed ************ (Pred::************
|
194
|
+
failed ************ (Pred::************
|
189
195
|
assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
|
190
196
|
);
|
191
197
|
|
192
198
|
template< typename Pred >
|
193
|
-
failed ************ (boost::mpl::not_<Pred>::************
|
199
|
+
failed ************ (boost::mpl::not_<Pred>::************
|
194
200
|
assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
|
195
201
|
);
|
196
202
|
|
203
|
+
#ifdef BOOST_MPL_IGNORE_PARENTHESES_WARNING
|
204
|
+
#undef BOOST_MPL_IGNORE_PARENTHESES_WARNING
|
205
|
+
#pragma GCC diagnostic pop
|
206
|
+
#endif
|
207
|
+
|
197
208
|
template< typename Pred >
|
198
209
|
AUX778076_ASSERT_ARG(assert<false>)
|
199
210
|
assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
|
@@ -432,8 +443,17 @@ BOOST_MPL_AUX_ASSERT_CONSTANT( \
|
|
432
443
|
/**/
|
433
444
|
#endif
|
434
445
|
|
435
|
-
#
|
446
|
+
#if 0
|
447
|
+
// Work around BOOST_MPL_ASSERT_MSG_IMPL generating multiple definition linker errors on VC++8.
|
448
|
+
// #if defined(BOOST_MSVC) && BOOST_MSVC < 1500
|
449
|
+
# include <boost/static_assert.hpp>
|
450
|
+
# define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
|
451
|
+
BOOST_STATIC_ASSERT_MSG( c, #msg ) \
|
452
|
+
/**/
|
453
|
+
#else
|
454
|
+
# define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
|
436
455
|
BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \
|
437
456
|
/**/
|
457
|
+
#endif
|
438
458
|
|
439
459
|
#endif // BOOST_MPL_ASSERT_HPP_INCLUDED
|
@@ -14,9 +14,8 @@
|
|
14
14
|
|
15
15
|
#include <boost/config.hpp>
|
16
16
|
#include <boost/detail/workaround.hpp>
|
17
|
+
#include <boost/predef.h>
|
17
18
|
#include <boost/type_traits.hpp>
|
18
|
-
|
19
|
-
namespace boost { namespace optional_detail {
|
20
19
|
|
21
20
|
// The condition to use POD implementation
|
22
21
|
|
@@ -40,11 +39,16 @@ namespace boost { namespace optional_detail {
|
|
40
39
|
# define BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
|
41
40
|
#endif
|
42
41
|
|
42
|
+
// GCC 5 or higher, or clang with libc++ or clang with libstdc++ 5 or higher
|
43
43
|
#if __cplusplus >= 201103L
|
44
44
|
# if BOOST_WORKAROUND(BOOST_GCC, >= 50000)
|
45
45
|
# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
|
46
46
|
# elif (defined BOOST_CLANG)
|
47
|
-
#
|
47
|
+
# if BOOST_LIB_STD_CXX > 0
|
48
|
+
# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
|
49
|
+
# elif BOOST_LIB_STD_GNU >= 441200023 && BOOST_LIB_STD_GNU != 450600023 && BOOST_LIB_STD_GNU != 450600026 && BOOST_LIB_STD_GNU != 460800003 && BOOST_LIB_STD_GNU != 450400026 && BOOST_LIB_STD_GNU != 460700026
|
50
|
+
# define BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
|
51
|
+
# endif
|
48
52
|
# endif
|
49
53
|
#endif
|
50
54
|
|
@@ -52,10 +56,12 @@ namespace boost { namespace optional_detail {
|
|
52
56
|
#ifndef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
|
53
57
|
# define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) BOOST_HAS_TRIVIAL_CONSTRUCTOR(T)
|
54
58
|
#else
|
59
|
+
# include <type_traits>
|
55
60
|
# define BOOST_OPTIONAL_DETAIL_HAS_TRIVIAL_CTOR(T) std::is_trivially_default_constructible<T>::value
|
56
61
|
#endif
|
57
62
|
|
58
63
|
|
64
|
+
namespace boost { namespace optional_detail {
|
59
65
|
|
60
66
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_SPEC_FOR_TRIVIAL_TYPES
|
61
67
|
template <typename T>
|
data/src/cxx_supportlib/vendor-modified/boost/optional/detail/old_optional_implementation.hpp
CHANGED
@@ -14,10 +14,9 @@
|
|
14
14
|
#define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
|
15
15
|
|
16
16
|
#include <boost/detail/reference_content.hpp>
|
17
|
-
#include <boost/mpl/bool.hpp>
|
18
|
-
#include <boost/mpl/if.hpp>
|
19
|
-
#include <boost/mpl/not.hpp>
|
20
17
|
#include <boost/type_traits/is_reference.hpp>
|
18
|
+
#include <boost/type_traits/integral_constant.hpp>
|
19
|
+
#include <boost/type_traits/conditional.hpp>
|
21
20
|
|
22
21
|
namespace boost {
|
23
22
|
|
@@ -96,13 +95,13 @@ class optional_base : public optional_tag
|
|
96
95
|
|
97
96
|
typedef T value_type ;
|
98
97
|
|
99
|
-
typedef
|
100
|
-
typedef
|
98
|
+
typedef true_type is_reference_tag ;
|
99
|
+
typedef false_type is_not_reference_tag ;
|
101
100
|
|
102
101
|
typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
|
103
102
|
|
104
103
|
public:
|
105
|
-
typedef BOOST_DEDUCED_TYPENAME
|
104
|
+
typedef BOOST_DEDUCED_TYPENAME conditional<is_reference_predicate::value,types_when_ref,types_when_not_ref>::type types ;
|
106
105
|
|
107
106
|
protected:
|
108
107
|
typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ;
|
@@ -333,7 +332,7 @@ class optional_base : public optional_tag
|
|
333
332
|
|
334
333
|
public :
|
335
334
|
|
336
|
-
//
|
335
|
+
// Destroys the current value, if any, leaving this UNINITIALIZED
|
337
336
|
// No-throw (assuming T::~T() doesn't)
|
338
337
|
void reset() BOOST_NOEXCEPT { destroy(); }
|
339
338
|
|
@@ -422,7 +421,7 @@ class optional_base : public optional_tag
|
|
422
421
|
template<class Expr>
|
423
422
|
void construct ( Expr&& factory, in_place_factory_base const* )
|
424
423
|
{
|
425
|
-
BOOST_STATIC_ASSERT ( ::
|
424
|
+
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
426
425
|
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
427
426
|
m_initialized = true ;
|
428
427
|
}
|
@@ -431,7 +430,7 @@ class optional_base : public optional_tag
|
|
431
430
|
template<class Expr>
|
432
431
|
void construct ( Expr&& factory, typed_in_place_factory_base const* )
|
433
432
|
{
|
434
|
-
BOOST_STATIC_ASSERT ( ::
|
433
|
+
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
435
434
|
factory.apply(m_storage.address()) ;
|
436
435
|
m_initialized = true ;
|
437
436
|
}
|
@@ -456,7 +455,7 @@ class optional_base : public optional_tag
|
|
456
455
|
template<class Expr>
|
457
456
|
void construct ( Expr const& factory, in_place_factory_base const* )
|
458
457
|
{
|
459
|
-
BOOST_STATIC_ASSERT ( ::
|
458
|
+
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
460
459
|
boost_optional_detail::construct<value_type>(factory, m_storage.address());
|
461
460
|
m_initialized = true ;
|
462
461
|
}
|
@@ -465,7 +464,7 @@ class optional_base : public optional_tag
|
|
465
464
|
template<class Expr>
|
466
465
|
void construct ( Expr const& factory, typed_in_place_factory_base const* )
|
467
466
|
{
|
468
|
-
BOOST_STATIC_ASSERT ( ::
|
467
|
+
BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
|
469
468
|
factory.apply(m_storage.address()) ;
|
470
469
|
m_initialized = true ;
|
471
470
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// Copyright (C) 2015-
|
1
|
+
// Copyright (C) 2015-2018 Andrzej Krzemienski.
|
2
2
|
//
|
3
3
|
// Use, modification, and distribution is subject to the Boost Software
|
4
4
|
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
@@ -159,6 +159,25 @@ public:
|
|
159
159
|
void reset() BOOST_NOEXCEPT { ptr_ = 0; }
|
160
160
|
|
161
161
|
bool is_initialized() const BOOST_NOEXCEPT { return ptr_ != 0; }
|
162
|
+
bool has_value() const BOOST_NOEXCEPT { return ptr_ != 0; }
|
163
|
+
|
164
|
+
template <typename F>
|
165
|
+
optional<typename boost::result_of<F(T&)>::type> map(F f) const
|
166
|
+
{
|
167
|
+
if (this->has_value())
|
168
|
+
return f(this->get());
|
169
|
+
else
|
170
|
+
return none;
|
171
|
+
}
|
172
|
+
|
173
|
+
template <typename F>
|
174
|
+
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(T&)>::type>::type> flat_map(F f) const
|
175
|
+
{
|
176
|
+
if (this->has_value())
|
177
|
+
return f(get());
|
178
|
+
else
|
179
|
+
return none;
|
180
|
+
}
|
162
181
|
|
163
182
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
164
183
|
|
data/src/cxx_supportlib/vendor-modified/boost/optional/detail/optional_trivially_copyable_base.hpp
CHANGED
@@ -30,7 +30,7 @@ class tc_optional_base : public optional_tag
|
|
30
30
|
:
|
31
31
|
m_initialized(false) {}
|
32
32
|
|
33
|
-
tc_optional_base ( argument_type val )
|
33
|
+
tc_optional_base ( init_value_tag, argument_type val )
|
34
34
|
:
|
35
35
|
m_initialized(true), m_storage(val) {}
|
36
36
|
|
@@ -71,7 +71,7 @@ class tc_optional_base : public optional_tag
|
|
71
71
|
// Assigns from another optional<T> (deep-copies the rhs value)
|
72
72
|
void assign ( tc_optional_base const& rhs )
|
73
73
|
{
|
74
|
-
this
|
74
|
+
*this = rhs;
|
75
75
|
}
|
76
76
|
|
77
77
|
// Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
|
@@ -127,7 +127,7 @@ class tc_optional_base : public optional_tag
|
|
127
127
|
|
128
128
|
public :
|
129
129
|
|
130
|
-
//
|
130
|
+
// Destroys the current value, if any, leaving this UNINITIALIZED
|
131
131
|
// No-throw (assuming T::~T() doesn't)
|
132
132
|
void reset() BOOST_NOEXCEPT { destroy(); }
|
133
133
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
|
2
|
-
// Copyright (C) 2014 -
|
2
|
+
// Copyright (C) 2014 - 2018 Andrzej Krzemienski.
|
3
3
|
//
|
4
4
|
// Use, modification, and distribution is subject to the Boost Software
|
5
5
|
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
@@ -53,25 +53,41 @@
|
|
53
53
|
#include <boost/move/utility.hpp>
|
54
54
|
#include <boost/none.hpp>
|
55
55
|
#include <boost/utility/compare_pointees.hpp>
|
56
|
+
#include <boost/utility/result_of.hpp>
|
56
57
|
|
57
58
|
#include <boost/optional/optional_fwd.hpp>
|
58
59
|
#include <boost/optional/detail/optional_config.hpp>
|
59
60
|
#include <boost/optional/detail/optional_factory_support.hpp>
|
60
61
|
#include <boost/optional/detail/optional_aligned_storage.hpp>
|
61
62
|
|
63
|
+
namespace boost { namespace optional_detail {
|
64
|
+
|
65
|
+
template <typename T>
|
66
|
+
struct optional_value_type
|
67
|
+
{
|
68
|
+
};
|
69
|
+
|
70
|
+
template <typename T>
|
71
|
+
struct optional_value_type< ::boost::optional<T> >
|
72
|
+
{
|
73
|
+
typedef T type;
|
74
|
+
};
|
75
|
+
|
76
|
+
}} // namespace boost::optional_detail
|
77
|
+
|
62
78
|
#ifdef BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
|
63
79
|
#include <boost/optional/detail/old_optional_implementation.hpp>
|
64
80
|
#else
|
65
81
|
namespace boost {
|
66
|
-
|
82
|
+
|
67
83
|
namespace optional_ns {
|
68
|
-
|
84
|
+
|
69
85
|
// a tag for in-place initialization of contained value
|
70
86
|
struct in_place_init_t
|
71
87
|
{
|
72
88
|
struct init_tag{};
|
73
89
|
explicit in_place_init_t(init_tag){}
|
74
|
-
};
|
90
|
+
};
|
75
91
|
const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
|
76
92
|
|
77
93
|
// a tag for conditional in-place initialization of contained value
|
@@ -81,7 +97,7 @@ struct in_place_init_if_t
|
|
81
97
|
explicit in_place_init_if_t(init_tag){}
|
82
98
|
};
|
83
99
|
const in_place_init_if_t in_place_init_if ((in_place_init_if_t::init_tag()));
|
84
|
-
|
100
|
+
|
85
101
|
} // namespace optional_ns
|
86
102
|
|
87
103
|
using optional_ns::in_place_init_t;
|
@@ -91,7 +107,9 @@ using optional_ns::in_place_init_if;
|
|
91
107
|
|
92
108
|
namespace optional_detail {
|
93
109
|
|
94
|
-
struct
|
110
|
+
struct init_value_tag {};
|
111
|
+
|
112
|
+
struct optional_tag {};
|
95
113
|
|
96
114
|
|
97
115
|
template<class T>
|
@@ -131,7 +149,7 @@ class optional_base : public optional_tag
|
|
131
149
|
|
132
150
|
// Creates an optional<T> initialized with 'val'.
|
133
151
|
// Can throw if T::T(T const&) does
|
134
|
-
optional_base ( argument_type val )
|
152
|
+
optional_base ( init_value_tag, argument_type val )
|
135
153
|
:
|
136
154
|
m_initialized(false)
|
137
155
|
{
|
@@ -141,7 +159,7 @@ class optional_base : public optional_tag
|
|
141
159
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
142
160
|
// move-construct an optional<T> initialized from an rvalue-ref to 'val'.
|
143
161
|
// Can throw if T::T(T&&) does
|
144
|
-
optional_base ( rval_reference_type val )
|
162
|
+
optional_base ( init_value_tag, rval_reference_type val )
|
145
163
|
:
|
146
164
|
m_initialized(false)
|
147
165
|
{
|
@@ -251,7 +269,7 @@ class optional_base : public optional_tag
|
|
251
269
|
construct(rhs.get_impl());
|
252
270
|
}
|
253
271
|
}
|
254
|
-
|
272
|
+
|
255
273
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
256
274
|
// Assigns from another optional<T> (deep-moves the rhs value)
|
257
275
|
void assign ( optional_base&& rhs )
|
@@ -268,7 +286,7 @@ class optional_base : public optional_tag
|
|
268
286
|
construct(boost::move(rhs.get_impl()));
|
269
287
|
}
|
270
288
|
}
|
271
|
-
#endif
|
289
|
+
#endif
|
272
290
|
|
273
291
|
// Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
|
274
292
|
template<class U>
|
@@ -282,7 +300,7 @@ class optional_base : public optional_tag
|
|
282
300
|
#else
|
283
301
|
assign_value( static_cast<value_type>(rhs.get()) );
|
284
302
|
#endif
|
285
|
-
|
303
|
+
|
286
304
|
else destroy();
|
287
305
|
}
|
288
306
|
else
|
@@ -315,7 +333,7 @@ class optional_base : public optional_tag
|
|
315
333
|
}
|
316
334
|
}
|
317
335
|
#endif
|
318
|
-
|
336
|
+
|
319
337
|
// Assigns from a T (deep-copies the rhs value)
|
320
338
|
void assign ( argument_type val )
|
321
339
|
{
|
@@ -323,7 +341,7 @@ class optional_base : public optional_tag
|
|
323
341
|
assign_value(val);
|
324
342
|
else construct(val);
|
325
343
|
}
|
326
|
-
|
344
|
+
|
327
345
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
328
346
|
// Assigns from a T (deep-moves the rhs value)
|
329
347
|
void assign ( rval_reference_type val )
|
@@ -362,7 +380,7 @@ class optional_base : public optional_tag
|
|
362
380
|
|
363
381
|
public :
|
364
382
|
|
365
|
-
//
|
383
|
+
// Destroys the current value, if any, leaving this UNINITIALIZED
|
366
384
|
// No-throw (assuming T::~T() doesn't)
|
367
385
|
void reset() BOOST_NOEXCEPT { destroy(); }
|
368
386
|
|
@@ -375,7 +393,7 @@ class optional_base : public optional_tag
|
|
375
393
|
pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
|
376
394
|
pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
|
377
395
|
|
378
|
-
bool is_initialized() const { return m_initialized ; }
|
396
|
+
bool is_initialized() const BOOST_NOEXCEPT { return m_initialized ; }
|
379
397
|
|
380
398
|
protected :
|
381
399
|
|
@@ -384,7 +402,7 @@ class optional_base : public optional_tag
|
|
384
402
|
::new (m_storage.address()) value_type(val) ;
|
385
403
|
m_initialized = true ;
|
386
404
|
}
|
387
|
-
|
405
|
+
|
388
406
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
389
407
|
void construct ( rval_reference_type val )
|
390
408
|
{
|
@@ -410,7 +428,7 @@ class optional_base : public optional_tag
|
|
410
428
|
destroy();
|
411
429
|
construct(in_place_init, boost::forward<Args>(args)...);
|
412
430
|
}
|
413
|
-
|
431
|
+
|
414
432
|
template<class... Args>
|
415
433
|
explicit optional_base ( in_place_init_t, Args&&... args )
|
416
434
|
:
|
@@ -418,7 +436,7 @@ class optional_base : public optional_tag
|
|
418
436
|
{
|
419
437
|
construct(in_place_init, boost::forward<Args>(args)...);
|
420
438
|
}
|
421
|
-
|
439
|
+
|
422
440
|
template<class... Args>
|
423
441
|
explicit optional_base ( in_place_init_if_t, bool cond, Args&&... args )
|
424
442
|
:
|
@@ -434,26 +452,26 @@ class optional_base : public optional_tag
|
|
434
452
|
::new (m_storage.address()) value_type( boost::forward<Arg>(arg) );
|
435
453
|
m_initialized = true ;
|
436
454
|
}
|
437
|
-
|
455
|
+
|
438
456
|
void construct ( in_place_init_t )
|
439
457
|
{
|
440
458
|
::new (m_storage.address()) value_type();
|
441
459
|
m_initialized = true ;
|
442
460
|
}
|
443
|
-
|
461
|
+
|
444
462
|
template<class Arg>
|
445
463
|
void emplace_assign ( Arg&& arg )
|
446
464
|
{
|
447
465
|
destroy();
|
448
466
|
construct(in_place_init, boost::forward<Arg>(arg)) ;
|
449
467
|
}
|
450
|
-
|
468
|
+
|
451
469
|
void emplace_assign ()
|
452
470
|
{
|
453
471
|
destroy();
|
454
472
|
construct(in_place_init) ;
|
455
473
|
}
|
456
|
-
|
474
|
+
|
457
475
|
template<class Arg>
|
458
476
|
explicit optional_base ( in_place_init_t, Arg&& arg )
|
459
477
|
:
|
@@ -461,14 +479,14 @@ class optional_base : public optional_tag
|
|
461
479
|
{
|
462
480
|
construct(in_place_init, boost::forward<Arg>(arg));
|
463
481
|
}
|
464
|
-
|
482
|
+
|
465
483
|
explicit optional_base ( in_place_init_t )
|
466
484
|
:
|
467
485
|
m_initialized(false)
|
468
486
|
{
|
469
487
|
construct(in_place_init);
|
470
488
|
}
|
471
|
-
|
489
|
+
|
472
490
|
template<class Arg>
|
473
491
|
explicit optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
|
474
492
|
:
|
@@ -477,7 +495,7 @@ class optional_base : public optional_tag
|
|
477
495
|
if ( cond )
|
478
496
|
construct(in_place_init, boost::forward<Arg>(arg));
|
479
497
|
}
|
480
|
-
|
498
|
+
|
481
499
|
explicit optional_base ( in_place_init_if_t, bool cond )
|
482
500
|
:
|
483
501
|
m_initialized(false)
|
@@ -487,21 +505,21 @@ class optional_base : public optional_tag
|
|
487
505
|
}
|
488
506
|
|
489
507
|
#else
|
490
|
-
|
508
|
+
|
491
509
|
template<class Arg>
|
492
510
|
void construct ( in_place_init_t, const Arg& arg )
|
493
511
|
{
|
494
512
|
::new (m_storage.address()) value_type( arg );
|
495
513
|
m_initialized = true ;
|
496
514
|
}
|
497
|
-
|
515
|
+
|
498
516
|
template<class Arg>
|
499
517
|
void construct ( in_place_init_t, Arg& arg )
|
500
518
|
{
|
501
519
|
::new (m_storage.address()) value_type( arg );
|
502
520
|
m_initialized = true ;
|
503
521
|
}
|
504
|
-
|
522
|
+
|
505
523
|
void construct ( in_place_init_t )
|
506
524
|
{
|
507
525
|
::new (m_storage.address()) value_type();
|
@@ -514,20 +532,20 @@ class optional_base : public optional_tag
|
|
514
532
|
destroy();
|
515
533
|
construct(in_place_init, arg);
|
516
534
|
}
|
517
|
-
|
535
|
+
|
518
536
|
template<class Arg>
|
519
537
|
void emplace_assign ( Arg& arg )
|
520
538
|
{
|
521
539
|
destroy();
|
522
540
|
construct(in_place_init, arg);
|
523
541
|
}
|
524
|
-
|
542
|
+
|
525
543
|
void emplace_assign ()
|
526
544
|
{
|
527
545
|
destroy();
|
528
546
|
construct(in_place_init);
|
529
547
|
}
|
530
|
-
|
548
|
+
|
531
549
|
template<class Arg>
|
532
550
|
explicit optional_base ( in_place_init_t, const Arg& arg )
|
533
551
|
: m_initialized(false)
|
@@ -541,13 +559,13 @@ class optional_base : public optional_tag
|
|
541
559
|
{
|
542
560
|
construct(in_place_init, arg);
|
543
561
|
}
|
544
|
-
|
562
|
+
|
545
563
|
explicit optional_base ( in_place_init_t )
|
546
564
|
: m_initialized(false)
|
547
565
|
{
|
548
566
|
construct(in_place_init);
|
549
567
|
}
|
550
|
-
|
568
|
+
|
551
569
|
template<class Arg>
|
552
570
|
explicit optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
|
553
571
|
: m_initialized(false)
|
@@ -555,15 +573,15 @@ class optional_base : public optional_tag
|
|
555
573
|
if ( cond )
|
556
574
|
construct(in_place_init, arg);
|
557
575
|
}
|
558
|
-
|
576
|
+
|
559
577
|
template<class Arg>
|
560
578
|
explicit optional_base ( in_place_init_if_t, bool cond, Arg& arg )
|
561
579
|
: m_initialized(false)
|
562
580
|
{
|
563
581
|
if ( cond )
|
564
582
|
construct(in_place_init, arg);
|
565
|
-
}
|
566
|
-
|
583
|
+
}
|
584
|
+
|
567
585
|
explicit optional_base ( in_place_init_if_t, bool cond )
|
568
586
|
: m_initialized(false)
|
569
587
|
{
|
@@ -757,8 +775,6 @@ class optional_base : public optional_tag
|
|
757
775
|
storage_type m_storage ;
|
758
776
|
} ;
|
759
777
|
|
760
|
-
|
761
|
-
|
762
778
|
#include <boost/optional/detail/optional_trivially_copyable_base.hpp>
|
763
779
|
|
764
780
|
// definition of metafunciton is_optional_val_init_candidate
|
@@ -772,7 +788,7 @@ struct is_optional_related
|
|
772
788
|
{};
|
773
789
|
|
774
790
|
#if !defined(BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT)
|
775
|
-
|
791
|
+
|
776
792
|
template <typename T, typename U>
|
777
793
|
struct is_convertible_to_T_or_factory
|
778
794
|
: boost::conditional< boost::is_base_of<boost::in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
|
@@ -856,12 +872,12 @@ class optional
|
|
856
872
|
|
857
873
|
// Creates an optional<T> initialized with 'val'.
|
858
874
|
// Can throw if T::T(T const&) does
|
859
|
-
optional ( argument_type val ) : base(val) {}
|
875
|
+
optional ( argument_type val ) : base(optional_detail::init_value_tag(), val) {}
|
860
876
|
|
861
877
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
862
878
|
// Creates an optional<T> initialized with 'move(val)'.
|
863
879
|
// Can throw if T::T(T &&) does
|
864
|
-
optional ( rval_reference_type val ) : base( boost::forward<T>(val)
|
880
|
+
optional ( rval_reference_type val ) : base(optional_detail::init_value_tag(), boost::forward<T>(val))
|
865
881
|
{}
|
866
882
|
#endif
|
867
883
|
|
@@ -872,7 +888,7 @@ class optional
|
|
872
888
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
873
889
|
/// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
|
874
890
|
// Can throw if T::T(T &&) does
|
875
|
-
optional ( bool cond, rval_reference_type val ) : base( cond, boost::forward<T>(val) )
|
891
|
+
optional ( bool cond, rval_reference_type val ) : base( cond, boost::forward<T>(val) )
|
876
892
|
{}
|
877
893
|
#endif
|
878
894
|
|
@@ -889,11 +905,11 @@ class optional
|
|
889
905
|
)
|
890
906
|
:
|
891
907
|
base()
|
892
|
-
{
|
908
|
+
{
|
893
909
|
if ( rhs.is_initialized() )
|
894
910
|
this->construct(rhs.get());
|
895
911
|
}
|
896
|
-
|
912
|
+
|
897
913
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
898
914
|
// Creates a deep move of another convertible optional<U>
|
899
915
|
// Requires a valid conversion from U to T.
|
@@ -926,10 +942,10 @@ class optional
|
|
926
942
|
|
927
943
|
|
928
944
|
template<class Expr>
|
929
|
-
explicit optional ( Expr&& expr,
|
930
|
-
BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr>, bool>::type = true
|
931
|
-
)
|
932
|
-
: base(boost::forward<Expr>(expr),boost::addressof(expr))
|
945
|
+
explicit optional ( Expr&& expr,
|
946
|
+
BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr>, bool>::type = true
|
947
|
+
)
|
948
|
+
: base(boost::forward<Expr>(expr),boost::addressof(expr))
|
933
949
|
{}
|
934
950
|
|
935
951
|
#else
|
@@ -973,7 +989,7 @@ class optional
|
|
973
989
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
974
990
|
|
975
991
|
template<class Expr>
|
976
|
-
BOOST_DEDUCED_TYPENAME boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type
|
992
|
+
BOOST_DEDUCED_TYPENAME boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type
|
977
993
|
operator= ( Expr&& expr )
|
978
994
|
{
|
979
995
|
this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
|
@@ -999,7 +1015,7 @@ class optional
|
|
999
1015
|
this->assign(rhs);
|
1000
1016
|
return *this ;
|
1001
1017
|
}
|
1002
|
-
|
1018
|
+
|
1003
1019
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
1004
1020
|
// Move-assigns from another convertible optional<U> (converts && deep-moves the rhs value)
|
1005
1021
|
// Requires a valid conversion from U to T.
|
@@ -1030,14 +1046,14 @@ class optional
|
|
1030
1046
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
|
1031
1047
|
optional& operator= ( optional && ) = default;
|
1032
1048
|
#else
|
1033
|
-
optional& operator= ( optional && rhs )
|
1049
|
+
optional& operator= ( optional && rhs )
|
1034
1050
|
BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
|
1035
1051
|
{
|
1036
1052
|
this->assign( static_cast<base &&>(rhs) ) ;
|
1037
1053
|
return *this ;
|
1038
1054
|
}
|
1039
|
-
#endif
|
1040
|
-
|
1055
|
+
#endif
|
1056
|
+
|
1041
1057
|
#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
1042
1058
|
|
1043
1059
|
#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
@@ -1050,7 +1066,7 @@ class optional
|
|
1050
1066
|
this->assign( boost::forward<T_>(val) ) ;
|
1051
1067
|
return *this ;
|
1052
1068
|
}
|
1053
|
-
|
1069
|
+
|
1054
1070
|
#else
|
1055
1071
|
|
1056
1072
|
// Assigns from a T (deep-copies the rhs value)
|
@@ -1060,7 +1076,7 @@ class optional
|
|
1060
1076
|
this->assign( val ) ;
|
1061
1077
|
return *this ;
|
1062
1078
|
}
|
1063
|
-
|
1079
|
+
|
1064
1080
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
1065
1081
|
// Assigns from a T (deep-moves the rhs value)
|
1066
1082
|
optional& operator= ( rval_reference_type val )
|
@@ -1069,9 +1085,9 @@ class optional
|
|
1069
1085
|
return *this ;
|
1070
1086
|
}
|
1071
1087
|
#endif
|
1072
|
-
|
1088
|
+
|
1073
1089
|
#endif // BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
1074
|
-
|
1090
|
+
|
1075
1091
|
// Assigns from a "none"
|
1076
1092
|
// Which destroys the current value, if any, leaving this UNINITIALIZED
|
1077
1093
|
// No-throw (assuming T::~T() doesn't)
|
@@ -1080,7 +1096,7 @@ class optional
|
|
1080
1096
|
this->assign( none_ ) ;
|
1081
1097
|
return *this ;
|
1082
1098
|
}
|
1083
|
-
|
1099
|
+
|
1084
1100
|
#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
1085
1101
|
// Constructs in-place
|
1086
1102
|
// upon exception *this is always uninitialized
|
@@ -1089,29 +1105,29 @@ class optional
|
|
1089
1105
|
{
|
1090
1106
|
this->emplace_assign( boost::forward<Args>(args)... );
|
1091
1107
|
}
|
1092
|
-
|
1108
|
+
|
1093
1109
|
template<class... Args>
|
1094
1110
|
explicit optional ( in_place_init_t, Args&&... args )
|
1095
1111
|
: base( in_place_init, boost::forward<Args>(args)... )
|
1096
1112
|
{}
|
1097
|
-
|
1113
|
+
|
1098
1114
|
template<class... Args>
|
1099
1115
|
explicit optional ( in_place_init_if_t, bool cond, Args&&... args )
|
1100
1116
|
: base( in_place_init_if, cond, boost::forward<Args>(args)... )
|
1101
1117
|
{}
|
1102
|
-
|
1118
|
+
|
1103
1119
|
#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
1104
1120
|
template<class Arg>
|
1105
1121
|
void emplace ( Arg&& arg )
|
1106
1122
|
{
|
1107
1123
|
this->emplace_assign( boost::forward<Arg>(arg) );
|
1108
1124
|
}
|
1109
|
-
|
1125
|
+
|
1110
1126
|
void emplace ()
|
1111
1127
|
{
|
1112
1128
|
this->emplace_assign();
|
1113
1129
|
}
|
1114
|
-
|
1130
|
+
|
1115
1131
|
template<class Args>
|
1116
1132
|
explicit optional ( in_place_init_t, Args&& args )
|
1117
1133
|
: base( in_place_init, boost::forward<Args>(args) )
|
@@ -1120,12 +1136,12 @@ class optional
|
|
1120
1136
|
explicit optional ( in_place_init_t )
|
1121
1137
|
: base( in_place_init )
|
1122
1138
|
{}
|
1123
|
-
|
1139
|
+
|
1124
1140
|
template<class Args>
|
1125
1141
|
explicit optional ( in_place_init_if_t, bool cond, Args&& args )
|
1126
1142
|
: base( in_place_init_if, cond, boost::forward<Args>(args) )
|
1127
1143
|
{}
|
1128
|
-
|
1144
|
+
|
1129
1145
|
explicit optional ( in_place_init_if_t, bool cond )
|
1130
1146
|
: base( in_place_init_if, cond )
|
1131
1147
|
{}
|
@@ -1135,23 +1151,23 @@ class optional
|
|
1135
1151
|
{
|
1136
1152
|
this->emplace_assign( arg );
|
1137
1153
|
}
|
1138
|
-
|
1154
|
+
|
1139
1155
|
template<class Arg>
|
1140
1156
|
void emplace ( Arg& arg )
|
1141
1157
|
{
|
1142
1158
|
this->emplace_assign( arg );
|
1143
1159
|
}
|
1144
|
-
|
1160
|
+
|
1145
1161
|
void emplace ()
|
1146
1162
|
{
|
1147
1163
|
this->emplace_assign();
|
1148
1164
|
}
|
1149
|
-
|
1165
|
+
|
1150
1166
|
template<class Arg>
|
1151
1167
|
explicit optional ( in_place_init_t, const Arg& arg )
|
1152
1168
|
: base( in_place_init, arg )
|
1153
1169
|
{}
|
1154
|
-
|
1170
|
+
|
1155
1171
|
template<class Arg>
|
1156
1172
|
explicit optional ( in_place_init_t, Arg& arg )
|
1157
1173
|
: base( in_place_init, arg )
|
@@ -1160,17 +1176,17 @@ class optional
|
|
1160
1176
|
explicit optional ( in_place_init_t )
|
1161
1177
|
: base( in_place_init )
|
1162
1178
|
{}
|
1163
|
-
|
1179
|
+
|
1164
1180
|
template<class Arg>
|
1165
1181
|
explicit optional ( in_place_init_if_t, bool cond, const Arg& arg )
|
1166
1182
|
: base( in_place_init_if, cond, arg )
|
1167
1183
|
{}
|
1168
|
-
|
1184
|
+
|
1169
1185
|
template<class Arg>
|
1170
1186
|
explicit optional ( in_place_init_if_t, bool cond, Arg& arg )
|
1171
1187
|
: base( in_place_init_if, cond, arg )
|
1172
|
-
{}
|
1173
|
-
|
1188
|
+
{}
|
1189
|
+
|
1174
1190
|
explicit optional ( in_place_init_if_t, bool cond )
|
1175
1191
|
: base( in_place_init_if, cond )
|
1176
1192
|
{}
|
@@ -1203,7 +1219,7 @@ class optional
|
|
1203
1219
|
// Returns a reference to the value if this is initialized, otherwise,
|
1204
1220
|
// the behaviour is UNDEFINED
|
1205
1221
|
// No-throw
|
1206
|
-
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
1222
|
+
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
1207
1223
|
reference_const_type operator *() const& { return this->get() ; }
|
1208
1224
|
reference_type operator *() & { return this->get() ; }
|
1209
1225
|
reference_type_of_temporary_wrapper operator *() && { return boost::move(this->get()) ; }
|
@@ -1212,42 +1228,42 @@ class optional
|
|
1212
1228
|
reference_type operator *() { return this->get() ; }
|
1213
1229
|
#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
|
1214
1230
|
|
1215
|
-
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
1231
|
+
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
1216
1232
|
reference_const_type value() const&
|
1217
|
-
{
|
1233
|
+
{
|
1218
1234
|
if (this->is_initialized())
|
1219
1235
|
return this->get() ;
|
1220
1236
|
else
|
1221
1237
|
throw_exception(bad_optional_access());
|
1222
1238
|
}
|
1223
|
-
|
1239
|
+
|
1224
1240
|
reference_type value() &
|
1225
|
-
{
|
1241
|
+
{
|
1226
1242
|
if (this->is_initialized())
|
1227
1243
|
return this->get() ;
|
1228
1244
|
else
|
1229
1245
|
throw_exception(bad_optional_access());
|
1230
1246
|
}
|
1231
|
-
|
1247
|
+
|
1232
1248
|
reference_type_of_temporary_wrapper value() &&
|
1233
|
-
{
|
1249
|
+
{
|
1234
1250
|
if (this->is_initialized())
|
1235
1251
|
return boost::move(this->get()) ;
|
1236
1252
|
else
|
1237
1253
|
throw_exception(bad_optional_access());
|
1238
1254
|
}
|
1239
1255
|
|
1240
|
-
#else
|
1256
|
+
#else
|
1241
1257
|
reference_const_type value() const
|
1242
|
-
{
|
1258
|
+
{
|
1243
1259
|
if (this->is_initialized())
|
1244
1260
|
return this->get() ;
|
1245
1261
|
else
|
1246
1262
|
throw_exception(bad_optional_access());
|
1247
1263
|
}
|
1248
|
-
|
1264
|
+
|
1249
1265
|
reference_type value()
|
1250
|
-
{
|
1266
|
+
{
|
1251
1267
|
if (this->is_initialized())
|
1252
1268
|
return this->get() ;
|
1253
1269
|
else
|
@@ -1259,16 +1275,16 @@ class optional
|
|
1259
1275
|
#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
|
1260
1276
|
template <class U>
|
1261
1277
|
value_type value_or ( U&& v ) const&
|
1262
|
-
{
|
1278
|
+
{
|
1263
1279
|
if (this->is_initialized())
|
1264
1280
|
return get();
|
1265
1281
|
else
|
1266
1282
|
return boost::forward<U>(v);
|
1267
1283
|
}
|
1268
|
-
|
1284
|
+
|
1269
1285
|
template <class U>
|
1270
|
-
value_type value_or ( U&& v ) &&
|
1271
|
-
{
|
1286
|
+
value_type value_or ( U&& v ) &&
|
1287
|
+
{
|
1272
1288
|
if (this->is_initialized())
|
1273
1289
|
return boost::move(get());
|
1274
1290
|
else
|
@@ -1276,7 +1292,7 @@ class optional
|
|
1276
1292
|
}
|
1277
1293
|
#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
1278
1294
|
template <class U>
|
1279
|
-
value_type value_or ( U&& v ) const
|
1295
|
+
value_type value_or ( U&& v ) const
|
1280
1296
|
{
|
1281
1297
|
if (this->is_initialized())
|
1282
1298
|
return get();
|
@@ -1285,17 +1301,17 @@ class optional
|
|
1285
1301
|
}
|
1286
1302
|
#else
|
1287
1303
|
template <class U>
|
1288
|
-
value_type value_or ( U const& v ) const
|
1289
|
-
{
|
1304
|
+
value_type value_or ( U const& v ) const
|
1305
|
+
{
|
1290
1306
|
if (this->is_initialized())
|
1291
1307
|
return get();
|
1292
1308
|
else
|
1293
1309
|
return v;
|
1294
1310
|
}
|
1295
|
-
|
1311
|
+
|
1296
1312
|
template <class U>
|
1297
|
-
value_type value_or ( U& v ) const
|
1298
|
-
{
|
1313
|
+
value_type value_or ( U& v ) const
|
1314
|
+
{
|
1299
1315
|
if (this->is_initialized())
|
1300
1316
|
return get();
|
1301
1317
|
else
|
@@ -1304,7 +1320,7 @@ class optional
|
|
1304
1320
|
#endif
|
1305
1321
|
|
1306
1322
|
|
1307
|
-
#
|
1323
|
+
#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
|
1308
1324
|
template <typename F>
|
1309
1325
|
value_type value_or_eval ( F f ) const&
|
1310
1326
|
{
|
@@ -1313,7 +1329,7 @@ class optional
|
|
1313
1329
|
else
|
1314
1330
|
return f();
|
1315
1331
|
}
|
1316
|
-
|
1332
|
+
|
1317
1333
|
template <typename F>
|
1318
1334
|
value_type value_or_eval ( F f ) &&
|
1319
1335
|
{
|
@@ -1322,6 +1338,61 @@ class optional
|
|
1322
1338
|
else
|
1323
1339
|
return f();
|
1324
1340
|
}
|
1341
|
+
|
1342
|
+
template <typename F>
|
1343
|
+
optional<typename boost::result_of<F(reference_type)>::type> map(F f) &
|
1344
|
+
{
|
1345
|
+
if (this->has_value())
|
1346
|
+
return f(get());
|
1347
|
+
else
|
1348
|
+
return none;
|
1349
|
+
}
|
1350
|
+
|
1351
|
+
template <typename F>
|
1352
|
+
optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const&
|
1353
|
+
{
|
1354
|
+
if (this->has_value())
|
1355
|
+
return f(get());
|
1356
|
+
else
|
1357
|
+
return none;
|
1358
|
+
}
|
1359
|
+
|
1360
|
+
template <typename F>
|
1361
|
+
optional<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type> map(F f) &&
|
1362
|
+
{
|
1363
|
+
if (this->has_value())
|
1364
|
+
return f(boost::move(this->get()));
|
1365
|
+
else
|
1366
|
+
return none;
|
1367
|
+
}
|
1368
|
+
|
1369
|
+
template <typename F>
|
1370
|
+
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f) &
|
1371
|
+
{
|
1372
|
+
if (this->has_value())
|
1373
|
+
return f(get());
|
1374
|
+
else
|
1375
|
+
return none;
|
1376
|
+
}
|
1377
|
+
|
1378
|
+
template <typename F>
|
1379
|
+
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const&
|
1380
|
+
{
|
1381
|
+
if (this->has_value())
|
1382
|
+
return f(get());
|
1383
|
+
else
|
1384
|
+
return none;
|
1385
|
+
}
|
1386
|
+
|
1387
|
+
template <typename F>
|
1388
|
+
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type>::type> flat_map(F f) &&
|
1389
|
+
{
|
1390
|
+
if (this->has_value())
|
1391
|
+
return f(boost::move(get()));
|
1392
|
+
else
|
1393
|
+
return none;
|
1394
|
+
}
|
1395
|
+
|
1325
1396
|
#else
|
1326
1397
|
template <typename F>
|
1327
1398
|
value_type value_or_eval ( F f ) const
|
@@ -1331,10 +1402,49 @@ class optional
|
|
1331
1402
|
else
|
1332
1403
|
return f();
|
1333
1404
|
}
|
1405
|
+
|
1406
|
+
template <typename F>
|
1407
|
+
optional<typename boost::result_of<F(reference_type)>::type> map(F f)
|
1408
|
+
{
|
1409
|
+
if (this->has_value())
|
1410
|
+
return f(get());
|
1411
|
+
else
|
1412
|
+
return none;
|
1413
|
+
}
|
1414
|
+
|
1415
|
+
template <typename F>
|
1416
|
+
optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const
|
1417
|
+
{
|
1418
|
+
if (this->has_value())
|
1419
|
+
return f(get());
|
1420
|
+
else
|
1421
|
+
return none;
|
1422
|
+
}
|
1423
|
+
|
1424
|
+
template <typename F>
|
1425
|
+
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f)
|
1426
|
+
{
|
1427
|
+
if (this->has_value())
|
1428
|
+
return f(get());
|
1429
|
+
else
|
1430
|
+
return none;
|
1431
|
+
}
|
1432
|
+
|
1433
|
+
template <typename F>
|
1434
|
+
optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const
|
1435
|
+
{
|
1436
|
+
if (this->has_value())
|
1437
|
+
return f(get());
|
1438
|
+
else
|
1439
|
+
return none;
|
1440
|
+
}
|
1441
|
+
|
1334
1442
|
#endif
|
1335
|
-
|
1443
|
+
|
1444
|
+
bool has_value() const BOOST_NOEXCEPT { return this->is_initialized() ; }
|
1445
|
+
|
1336
1446
|
bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; }
|
1337
|
-
|
1447
|
+
|
1338
1448
|
BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
|
1339
1449
|
} ;
|
1340
1450
|
|
@@ -1343,7 +1453,7 @@ class optional
|
|
1343
1453
|
#endif // BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
|
1344
1454
|
|
1345
1455
|
namespace boost {
|
1346
|
-
|
1456
|
+
|
1347
1457
|
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
1348
1458
|
template<class T>
|
1349
1459
|
class optional<T&&>
|
@@ -1472,14 +1582,14 @@ get_pointer ( optional
|
|
1472
1582
|
} // namespace boost
|
1473
1583
|
|
1474
1584
|
namespace boost {
|
1475
|
-
|
1585
|
+
|
1476
1586
|
// The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header.
|
1477
1587
|
template<class CharType, class CharTrait>
|
1478
1588
|
std::basic_ostream<CharType, CharTrait>&
|
1479
1589
|
operator<<(std::basic_ostream<CharType, CharTrait>& os, optional_detail::optional_tag const&)
|
1480
1590
|
{
|
1481
1591
|
BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
|
1482
|
-
return os;
|
1592
|
+
return os;
|
1483
1593
|
}
|
1484
1594
|
|
1485
1595
|
} // namespace boost
|